<!DOCTYPE html>
<html>
  <!-- meta/link... -->
  



<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <!-- Global site tag (gtag.js) - Google Analytics -->


  <title>Bamboo主题-首页新增侧边栏 | Bamboo</title>

  <link rel="icon" type="image/x-icon, image/vnd.microsoft.icon" href="/favicon.ico">
  <link rel="stylesheet" href="https://at.alicdn.com/t/font_1911880_c1nvbyezg17.css">
  <link href="https://cdn.jsdelivr.net/gh/inkss/fontawesome@5.15.3/css/all.min.css" rel="stylesheet">

  
    <script>
        var themeModelId = '2';
        if (themeModelId) {
            localStorage.setItem('modelId', themeModelId);
        }
    </script>
    
    <script src="https://cdn.jsdelivr.net/gh/yuang01/live2d-widget@latest/autoload.js"></script>
    <script>
        var live2dOpen = eval('true') || false;
        if (!live2dOpen) {
            localStorage.setItem('waifu-display', 1609323474481);
        }
    </script>
  
  
  
<link rel="stylesheet" href="/css/animate.min.css">

  
<link rel="stylesheet" href="/css/style.css">

  
  
    
<link rel="stylesheet" href="/js/fancybox/jquery.fancybox.min.css">

  
  
    
<link rel="stylesheet" href="/js/shareJs/share.min.css">

  
  <style>
        @media (max-width: 992px) {
            #waifu {
                display: none;
            }
        }
    </style>
    <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
    <link href="//cdn.bootcss.com/pace/1.0.2/themes/pink/pace-theme-flash.css" rel="stylesheet">

    

    <!-- import link -->
    
        
            
        
            
        
    
    <!-- import script -->
    
        
            
        
            
        
    

<meta name="generator" content="Hexo 5.3.0"><link rel="alternate" href="/atom.xml" title="Bamboo" type="application/atom+xml">
</head>

  
  <!-- 依赖于jquery和vue -->
  <script src="/js/jquery3.5.1.js"></script>
  <script src="/js/vue2.6.11.js"></script>
  
  <body>
    <!-- 预加载动画 -->
    <!-- 页面预加载动画 -->

<div id='loader'>
  <link rel="stylesheet" href="/js/loaded/index.css" >
  <div class="loading-left-bg"></div>
  <div class="loading-right-bg"></div>
  <div class="spinner-box">
    <div class="configure-border-1">
      <div class="configure-core"></div>
    </div>
    <div class="configure-border-2">
      <div class="configure-core"></div>
    </div>
    <div class="loading-word">加载中...</div>
  </div>
</div>

<script>
  var endLoading = function () {
    document.body.style.overflow = 'auto';
    document.getElementById('loader').classList.add("loading");
  }
  window.addEventListener('DOMContentLoaded',endLoading);
  
</script>

    
    <!-- 判断是否为暗黑风格 -->
    <!-- 判断是否为黑夜模式 -->
<script>
  let isDark = JSON.parse(localStorage.getItem('dark')) || JSON.parse('false');

  if (isDark) {
    $(document.body).addClass('darkModel');
  }
</script>

    <!-- 头部导航等 -->
    
<header class="header " id="navHeader"
  style="position: fixed;
  left: 0; top: 0; z-index: 10;width: 100%;"
>
  <div class="header-content">
    <div class="bars">
      <div id="appDrawer" class="sidebar-image">
  <div class="drawer-box-icon">
    <i class="fas fa-bars" aria-hidden="true" @click="showDialogDrawer"></i>
  </div>
  
  <transition name="fade">
    <div class="drawer-box_mask" v-cloak style="display: none;" v-show="visible" @click.self="cancelDialogDrawer">
    </div>
  </transition>
  <div class="drawer-box" :class="{'active': visible}">
    <div class="drawer-box-head bg-color">
      <img class="drawer-box-head_logo lazyload placeholder" src="/medias/logo.png" class="lazyload placeholder" data-srcset="/medias/logo.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="logo">
      <h3 class="drawer-box-head_title">Bamboo</h3>
      <h5 class="drawer-box-head_desc">千磨万击还坚劲，任尔东西南北风</h5>
    </div>
    
    <div class="drawer-box-content">
      <ul class="drawer-box-content_menu">
        
          
            <li class="drawer-box-content_item" style="position: relative;">
              
                <a href="/" class="drawer-menu-item-link">
                  
                    <i class="fa fa-home" aria-hidden="true"></i>
                  
                  <span class="name">首页</span>
                </a>
              
            </li>
          
            <li class="drawer-box-content_item" style="position: relative;">
              
                <a href="javascript:;" class="drawer-menu-item-link has-children" @click="openOrCloseMenu(1)">
                  <span>
                    
                    <span class="name">📄文档</span>
                  </span>
                  <i class="fas fa-chevron-left arrow " :class="{'icon-rotate': isOpen(1)}" aria-hidden="true"></i>
                </a>
                <ul class="drawer-sub-menu" v-if="isOpen(1)">
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo-new">
                      
                      <span>基本配置</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/page/">
                      
                      <span>页面功能配置</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/theme/">
                      
                      <span>主题更改</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/front-matter/">
                      
                      <span>Front-matter介绍</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/tags/">
                      
                      <span>内置标签</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/suggest/">
                      
                      <span>建议</span>
                    </a>
                  </li>
                  
                </ul>
              
            </li>
          
            <li class="drawer-box-content_item" style="position: relative;">
              
                <a href="/archives" class="drawer-menu-item-link">
                  
                    <i class="fa fa-archive" aria-hidden="true"></i>
                  
                  <span class="name">归档</span>
                </a>
              
            </li>
          
            <li class="drawer-box-content_item" style="position: relative;">
              
                <a href="/tags" class="drawer-menu-item-link">
                  
                    <i class="fa fa-tags" aria-hidden="true"></i>
                  
                  <span class="name">标签</span>
                </a>
              
            </li>
          
            <li class="drawer-box-content_item" style="position: relative;">
              
                <a href="/categories" class="drawer-menu-item-link">
                  
                    <i class="fa fa-bookmark" aria-hidden="true"></i>
                  
                  <span class="name">分类</span>
                </a>
              
            </li>
          
            <li class="drawer-box-content_item" style="position: relative;">
              
                <a href="/about" class="drawer-menu-item-link">
                  
                    <i class="fa fa-user" aria-hidden="true"></i>
                  
                  <span class="name">关于</span>
                </a>
              
            </li>
          
            <li class="drawer-box-content_item" style="position: relative;">
              
                <a href="/friends" class="drawer-menu-item-link">
                  
                  <span class="name">友情链接</span>
                </a>
              
            </li>
          
            <li class="drawer-box-content_item" style="position: relative;">
              
                <a href="javascript:;" class="drawer-menu-item-link has-children" @click="openOrCloseMenu(7)">
                  <span>
                    
                    <span class="name">🐱更多</span>
                  </span>
                  <i class="fas fa-chevron-left arrow " :class="{'icon-rotate': isOpen(7)}" aria-hidden="true"></i>
                </a>
                <ul class="drawer-sub-menu" v-if="isOpen(7)">
                  
                  <li>
                    <a href="/gallery">
                      
                      <span>📷图库</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/huoban">
                      
                      <span>👪友情连接</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/me">
                      
                      <span>🧒🏻关于我</span>
                    </a>
                  </li>
                  
                  <li>
                    <a target="_blank" rel="noopener" href="http://baidu.com">
                      
                      <span>🉐百度</span>
                    </a>
                  </li>
                  
                </ul>
              
            </li>
          
        
        
          <li class="drawer-box-content_item">
            <a target="_blank" rel="noopener" href="https://github.com/yuang01/hexo-theme-bamboo">
              <i class="fas fa-github" aria-hidden="true"></i>
              <span>Github</span>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</div>

<script>
  var body = document.body || document.documentElement || window;
  var vm = new Vue({
    el: '#appDrawer',
    data: {
      visible: false,
      top: 0,
      openArr: [],
    },
    computed: {
    },
    mounted() {
    },
    methods: {
      isOpen(index) {
        if (this.openArr.includes(index)) {
          return true;
        } else {
          return false;
        }
      },
      openOrCloseMenu(curIndex) {
        const index = this.openArr.indexOf(curIndex);
        if (index !== -1) {
          this.openArr.splice(index, 1);
        } else {
          this.openArr.push(curIndex);
        }
      },
      showDialogDrawer() {
        this.visible = true;
        // 防止页面滚动，只能让弹框滚动
        this.top = $(document).scrollTop()
        body.style.cssText = 'width: 100%; height: 100%;overflow: hidden;';
      },
      cancelDialogDrawer() {
        this.visible = false;
        body.removeAttribute('style');
        $(document).scrollTop(this.top)
      }
    },
    created() {}
  })
</script>

    </div>
    <div class="blog-title" id="author-avatar">
      
        <div class="avatar">
          <img src="/medias/logo.png" class="lazyload placeholder" data-srcset="/medias/logo.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="logo">
        </div>
      
      <a href="/" class="logo">Bamboo</a>
    </div>
    <nav class="navbar">
      <ul class="menu">
        
          
            <li class="menu-item" style="position: relative;">
              
                <a href="/" class="menu-item-link" title="首页">
                  
                    <i class="fa fa-home" aria-hidden="true"></i>
                  
                  <span class="name">首页</span>
                </a>
              
            </li>
          
            <li class="menu-item" style="position: relative;">
              
                <a href="javascript:;" class="menu-item-link" title="📄文档">
                  
                  <span class="name">📄文档</span>
                  <i class="fas fa-chevron-down arrow" aria-hidden="true"></i>
                </a>
                <ul class="sub-menu">
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo-new">
                      
                      <span>基本配置</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/page/">
                      
                      <span>页面功能配置</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/theme/">
                      
                      <span>主题更改</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/front-matter/">
                      
                      <span>Front-matter介绍</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/tags/">
                      
                      <span>内置标签</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/post/hexo-theme-bamboo/suggest/">
                      
                      <span>建议</span>
                    </a>
                  </li>
                  
                </ul>
              
            </li>
          
            <li class="menu-item" style="position: relative;">
              
                <a href="/archives" class="menu-item-link" title="归档">
                  
                    <i class="fa fa-archive" aria-hidden="true"></i>
                  
                  <span class="name">归档</span>
                </a>
              
            </li>
          
            <li class="menu-item" style="position: relative;">
              
                <a href="/tags" class="menu-item-link" title="标签">
                  
                    <i class="fa fa-tags" aria-hidden="true"></i>
                  
                  <span class="name">标签</span>
                </a>
              
            </li>
          
            <li class="menu-item" style="position: relative;">
              
                <a href="/categories" class="menu-item-link" title="分类">
                  
                    <i class="fa fa-bookmark" aria-hidden="true"></i>
                  
                  <span class="name">分类</span>
                </a>
              
            </li>
          
            <li class="menu-item" style="position: relative;">
              
                <a href="/about" class="menu-item-link" title="关于">
                  
                    <i class="fa fa-user" aria-hidden="true"></i>
                  
                  <span class="name">关于</span>
                </a>
              
            </li>
          
            <li class="menu-item" style="position: relative;">
              
                <a href="/friends" class="menu-item-link" title="友情链接">
                  
                  <span class="name">友情链接</span>
                </a>
              
            </li>
          
            <li class="menu-item" style="position: relative;">
              
                <a href="javascript:;" class="menu-item-link" title="🐱更多">
                  
                  <span class="name">🐱更多</span>
                  <i class="fas fa-chevron-down arrow" aria-hidden="true"></i>
                </a>
                <ul class="sub-menu">
                  
                  <li>
                    <a href="/gallery">
                      
                      <span>📷图库</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/huoban">
                      
                      <span>👪友情连接</span>
                    </a>
                  </li>
                  
                  <li>
                    <a href="/me">
                      
                      <span>🧒🏻关于我</span>
                    </a>
                  </li>
                  
                  <li>
                    <a target="_blank" rel="noopener" href="http://baidu.com">
                      
                      <span>🉐百度</span>
                    </a>
                  </li>
                  
                </ul>
              
            </li>
          
        
      </ul>
      
      
        <div id="appSearch">
  <div class="search"  @click="showDialog()"><i class="fas fa-search" aria-hidden="true"></i></div>
  <transition name="fade">
    <div class="message-box_wrapper" style="display: none;" v-cloak v-show="dialogVisible" @click.self="cancelDialogVisible()">
      <div class="message-box animated bounceInDown">
        <h2>
          <span>
            <i class="fas fa-search" aria-hidden="true"></i>
            <span class="title">本地搜索</span>
          </span>
          <i class="fas fa-times close" pointer style="float:right;" aria-hidden="true" @click.self="cancelDialogVisible()"></i>
        </h2>
        <form class="site-search-form">
          <input type="text"
            placeholder="请输入关键字"
            id="local-search-input" 
            @click="getSearchFile()"
            class="st-search-input"
            v-model="searchInput"
          />
        </form>
        <div class="result-wrapper">
          <div id="local-search-result" class="local-search-result-cls"></div>
        </div>
      </div>
    </div>
  </transition>
</div>
<script src="/js/local_search.js"></script>
<script>
  var body = document.body || document.documentElement || window;
  var vm = new Vue({
    el: '#appSearch',
    data: {
      dialogVisible: false,
      searchInput: '',
      top: 0,
    },
    computed: {
    },
    mounted() {
    },
    methods: {
      showDialog() {
        this.dialogVisible = true;
        // 防止页面滚动，只能让弹框滚动
        this.top = $(document).scrollTop()
        body.style.cssText = 'overflow: hidden;';
      },
      getSearchFile() {
        if (!this.searchInput) {
          getSearchFile("/search.xml");
        }
      },
      cancelDialogVisible() {
        this.dialogVisible = false;
        body.removeAttribute('style');
        $(document).scrollTop(this.top)
      },
    },
    created() {}
  })
</script>
<!-- 解决刷新页面闪烁问题，可以在元素上添加display: none, 或者用vue.extend方法，详情：https://blog.csdn.net/qq_31393401/article/details/81017912 -->
<!-- 下面是搜索基本写法 -->
<!-- <script type="text/javascript" id="local.search.active">
  var inputArea = document.querySelector("#local-search-input");
  inputArea.onclick   = function(){ getSearchFile(); this.onclick = null }
  inputArea.onkeydown = function(){ if(event.keyCode == 13) return false }
</script> -->

      

    </nav>
  </div>
  
    <a target="_blank" rel="noopener" href="https://github.com/yuang01/hexo-theme-bamboo" class="github-corner color-primary" aria-label="View source on GitHub"><svg width="60" height="60" viewBox="0 0 250 250" style="fill:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
  
  
    <div id="he-plugin-simple"></div>
    <script>
      WIDGET = {
        CONFIG: {
          "modules": "012",
          "background": 5,
          "tmpColor": "4A4A4A",
          "tmpSize": 16,
          "cityColor": "4A4A4A",
          "citySize": 16,
          "aqiSize": 16,
          "weatherIconSize": 24,
          "alertIconSize": 18,
          "padding": "10px 10px 10px 10px",
          "shadow": "1",
          "language": "auto",
          "borderRadius": 5,
          "fixed": "false",
          "vertical": "middle",
          "horizontal": "center",
          "key": "2784dd3fcb1e4f0f9a9b579bf69641f2"
        }
      }
    </script>
    <script src="https://widget.qweather.net/simple/static/js/he-simple-common.js?v=2.0"></script> 
    

    <!-- 当头部导航设置为背景透明的时候  -->
    
      <script src="/js/header/index.js" data-pjax></script>
    
</header>

    <!-- 需要在上面加载的js -->
    <script>
  function loadScript(src, cb) {
    setTimeout(function () {
      var HEAD = document.getElementsByTagName('head')[0] || document.documentElement;
      var script = document.createElement('script');
      script.setAttribute('type', 'text/javascript');
      if (cb) script.onload = cb;
      script.setAttribute('src', src);
      HEAD.appendChild(script);
    });
  }

  //https://github.com/filamentgroup/loadCSS
  var loadCSS = function (href, before, media, attributes) {
    var doc = window.document;
    var ss = doc.createElement("link");
    var ref;
    if (before) {
      ref = before;
    }
    else {
      var refs = (doc.body || doc.getElementsByTagName("head")[0]).childNodes;
      ref = refs[refs.length - 1];
    }
    var sheets = doc.styleSheets;
    if (attributes) {
      for (var attributeName in attributes) {
        if (attributes.hasOwnProperty(attributeName)) {
          ss.setAttribute(attributeName, attributes[attributeName]);
        }
      }
    }
    ss.rel = "stylesheet";
    ss.href = href;
    ss.media = "only x";
    function ready(cb) {
      if (doc.body) {
        return cb();
      }
      setTimeout(function () {
        ready(cb);
      });
    }
    ready(function () {
      ref.parentNode.insertBefore(ss, (before ? ref : ref.nextSibling));
    });
    var onloadcssdefined = function (cb) {
      var resolvedHref = ss.href;
      var i = sheets.length;
      while (i--) {
        if (sheets[i].href === resolvedHref) {
          return cb();
        }
      }
      setTimeout(function () {
        onloadcssdefined(cb);
      });
    };
    function loadCB() {
      if (ss.addEventListener) {
        ss.removeEventListener("load", loadCB);
      }
      ss.media = media || "all";
    }
    if (ss.addEventListener) {
      ss.addEventListener("load", loadCB);
    }
    ss.onloadcssdefined = onloadcssdefined;
    onloadcssdefined(loadCB);
    return ss;
  };

</script> 

<!-- 轮播图所需要的js -->
<script src="/js/swiper/swiper.min.js"></script>
<script src="/js/swiper/vue-awesome-swiper.js"></script>
<script src="/js/swiper/swiper.animate1.0.3.min.js"></script>


  <script src="/js/vue-typed-js/index.js"></script>


<!-- 首页的公告滚动插件的js需要重新加载 -->
<script src="/js/vue-seamless-scroll/index.js"></script>

<!-- 打字机效果js -->
<script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11"></script>


    <!-- 内容区域 -->
    <div id="safearea">
      <main class="main" id="pjax-container" style="margin-top: 0;">
        
 <!-- prismjs 代码高亮 -->
 
    
    <link href="/js/prism/prism-line-numbers.css" rel="stylesheet">
    
        <link href="/js/prism/prism.min.css" rel="stylesheet">
    

    <style>
        pre[class*="language-"] {
            overflow-y: hidden;
        }
        .line-numbers .line-numbers-rows {
            border: none;
        }
    </style>
  


<div class="bg-dark-floor" style="position: fixed;left: 0;top: 0;width: 100%;height: 100%;z-index: -1;"></div>

<!-- 文章详情页顶部图片和标题 -->




<div class="post-detail-header" id="thumbnail_canvas" style="background-repeat: no-repeat; background-size: cover; 
  background-position: center center;position: relative;background-image:url('https://pic1.zhimg.com/80/v2-70e3aa84f510f98da30f955b5cc22fc5_1440w.jpg?source=1940ef5c')">
  <div class="post-detail-header-mask"></div>
  <canvas id="header_canvas"style="position:absolute;bottom:0;pointer-events:none;"></canvas>
  
  <div class="post-detail-header_info-box">
    <div class="title-box">
      <span class="title">
        Bamboo主题-首页新增侧边栏
      </span>
    </div>
    
    
      
        <span class="post-detail-header_date">
          <i class="fas fa-calendar"></i> 发表于：2021-09-28 |
        </span>
      

      
        <span class="post-detail-header_categories">
          <i class="iconfont iconbookmark1"></i> 分类：
          
            <a href="/categories/%E5%89%8D%E7%AB%AF/" class="post-detail-header_category">
              前端
            </a>
          
        </span>
      

      
        <div class="post-detail-header_wordcount">
          <span class="totalcount">
            <i class="fas fa-file-text-o"></i> 字数统计: 8.1k |
          </span>
  
          <span class="min2read">
            <i class="fas fa-clock"></i> 阅读时长: 45分钟 |
          </span>
  
          
            <span class="reading">
              <i class="fas fa-eye"></i> 阅读量：<span id="busuanzi_value_page_pv"></span>
            </span>
          
        </div>
      
    
  </div>
  
  
    <script src="/js/bubble/bubble.js"></script>
  
</div>



<div class="row justify-position">
  <div class="main-content">
    <article class="post post-detail">
      <div class="post-content">
        <blockquote>
<p>首页侧边栏支持的版本为 <code>v2.6.0+</code></p>
</blockquote>
<h2 id="默认的侧边栏"><a href="#默认的侧边栏" class="headerlink" title="默认的侧边栏"></a>默认的侧边栏</h2><p>在主题的<code>config.yml</code>文件中配置</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token comment"># sidebar侧边栏</span>
<span class="token key atrule">sidebar</span><span class="token punctuation">:</span>
  <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
  <span class="token key atrule">position</span><span class="token punctuation">:</span> left <span class="token comment"># left right</span>
  <span class="token key atrule">widget_library</span><span class="token punctuation">:</span>
    <span class="token key atrule">side_blogger</span><span class="token punctuation">:</span>
      <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
      <span class="token key atrule">avatar</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//api.btstu.cn/sjtx/api.php<span class="token punctuation">?</span>lx=c1<span class="token important">&amp;format=images</span>
      <span class="token key atrule">shape</span><span class="token punctuation">:</span> rectangle <span class="token comment"># circle, rectangle</span>
      <span class="token key atrule">url</span><span class="token punctuation">:</span> /about/
      <span class="token key atrule">title</span><span class="token punctuation">:</span> 青墨书晚风
      <span class="token key atrule">subtitle</span><span class="token punctuation">:</span> 我是副标题
      <span class="token key atrule">jinrishici</span><span class="token punctuation">:</span> <span class="token boolean important">true</span> <span class="token comment"># Poetry Today. You can set a string, and it will be displayed when loading fails.</span>
      <span class="token key atrule">fontFammily</span><span class="token punctuation">:</span> Long Cang<span class="token punctuation">,</span>cursive
      <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
      <span class="token key atrule">order</span><span class="token punctuation">:</span>  <span class="token comment"># 卡片排序, 数值越小，越在上面</span>
      <span class="token key atrule">social</span><span class="token punctuation">:</span>
        <span class="token punctuation">-</span> <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>rss
          <span class="token key atrule">url</span><span class="token punctuation">:</span> /atom.xml
        <span class="token punctuation">-</span> <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
          <span class="token key atrule">url</span><span class="token punctuation">:</span> mailto<span class="token punctuation">:</span>me@xxx.com
        <span class="token punctuation">-</span> <span class="token key atrule">icon</span><span class="token punctuation">:</span> fab fa<span class="token punctuation">-</span>github
          <span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//github.com/yuang01/hexo<span class="token punctuation">-</span>theme<span class="token punctuation">-</span>bamboo
        <span class="token punctuation">-</span> <span class="token key atrule">icon</span><span class="token punctuation">:</span> fab fa<span class="token punctuation">-</span>qq
          <span class="token key atrule">url</span><span class="token punctuation">:</span> tencent<span class="token punctuation">:</span>//AddContact/<span class="token punctuation">?</span>fromId=50<span class="token important">&amp;fromSubId=1&amp;subcmd=all&amp;uin=你的qq号码</span>
    <span class="token comment"># ---------------------------------------</span>
    <span class="token comment"># category widget</span>
    <span class="token key atrule">side_category</span><span class="token punctuation">:</span>
      <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
      <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
      <span class="token key atrule">order</span><span class="token punctuation">:</span>  <span class="token comment"># 卡片排序(widget都有)，任意数字，数字小的在上面</span>
      <span class="token key atrule">header</span><span class="token punctuation">:</span>
        <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>folder<span class="token punctuation">-</span>open
        <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token comment"># 标题字体颜色</span>
        <span class="token key atrule">title</span><span class="token punctuation">:</span> 文章分类
        <span class="token key atrule">url</span><span class="token punctuation">:</span> /blog/categories/
    <span class="token comment"># ---------------------------------------</span>
    <span class="token comment"># tagcloud widget</span>
    <span class="token key atrule">side_tagcloud</span><span class="token punctuation">:</span>
      <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
      <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
      <span class="token key atrule">order</span><span class="token punctuation">:</span> 
      <span class="token key atrule">header</span><span class="token punctuation">:</span>
        <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>tags
        <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> 
        <span class="token key atrule">title</span><span class="token punctuation">:</span> 热门标签
        <span class="token key atrule">url</span><span class="token punctuation">:</span> /tags/
      <span class="token key atrule">min_font</span><span class="token punctuation">:</span> <span class="token number">14</span>
      <span class="token key atrule">max_font</span><span class="token punctuation">:</span> <span class="token number">24</span>
      <span class="token key atrule">color</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
      <span class="token key atrule">start_color</span><span class="token punctuation">:</span> <span class="token string">'#999'</span>
      <span class="token key atrule">end_color</span><span class="token punctuation">:</span> <span class="token string">'#555'</span>
    <span class="token comment"># ---------------------------------------</span>
    <span class="token comment"># recent_post widget</span>
    <span class="token key atrule">side_recent_post</span><span class="token punctuation">:</span>
      <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
      <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
      <span class="token key atrule">limit</span><span class="token punctuation">:</span> <span class="token number">5</span>
      <span class="token key atrule">sort</span><span class="token punctuation">:</span> update <span class="token comment"># date</span>
      <span class="token key atrule">order</span><span class="token punctuation">:</span> 
      <span class="token key atrule">header</span><span class="token punctuation">:</span>
        <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>book
        <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> 
        <span class="token key atrule">title</span><span class="token punctuation">:</span> 最新文章
        <span class="token key atrule">url</span><span class="token punctuation">:</span> /tags/
    <span class="token comment"># ---------------------------------------</span>
    <span class="token comment"># side_archives widget</span>
    <span class="token key atrule">side_archives</span><span class="token punctuation">:</span>
      <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
      <span class="token key atrule">type</span><span class="token punctuation">:</span> monthly <span class="token comment"># yearly or monthly      or yearly</span>
      <span class="token key atrule">format</span><span class="token punctuation">:</span> MMMM YYYY <span class="token comment"># eg: YYYY年MM月     or YYYY</span>
      <span class="token key atrule">timeOrder</span><span class="token punctuation">:</span> <span class="token number">-1</span> <span class="token comment"># Sort of order. 1, asc for ascending; -1, desc for descending 时间排序</span>
      <span class="token key atrule">limit</span><span class="token punctuation">:</span> <span class="token number">8</span> <span class="token comment"># if set 0 will show all</span>
      <span class="token key atrule">order</span><span class="token punctuation">:</span>  <span class="token comment"># widget order 卡片排序</span>
      <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
      <span class="token key atrule">header</span><span class="token punctuation">:</span> 
        <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>archive
        <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> red
        <span class="token key atrule">title</span><span class="token punctuation">:</span> 归档
    <span class="token comment"># ---------------------------------------</span>
    <span class="token comment"># side_webinfo widget</span>
    <span class="token key atrule">side_webinfo</span><span class="token punctuation">:</span>
      <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
      <span class="token key atrule">order</span><span class="token punctuation">:</span> 
      <span class="token key atrule">header</span><span class="token punctuation">:</span> 
        <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>chart<span class="token punctuation">-</span>line
        <span class="token key atrule">title</span><span class="token punctuation">:</span> 站点信息
      <span class="token key atrule">type</span><span class="token punctuation">:</span>
        <span class="token key atrule">article</span><span class="token punctuation">:</span>
          <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
          <span class="token key atrule">text</span><span class="token punctuation">:</span> <span class="token string">'文章数目：'</span>
          <span class="token key atrule">unit</span><span class="token punctuation">:</span> <span class="token string">'篇'</span>
        <span class="token key atrule">runtime</span><span class="token punctuation">:</span>
          <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
          <span class="token key atrule">data</span><span class="token punctuation">:</span> <span class="token string">'2020/01/01'</span>    <span class="token comment"># 填写建站日期</span>
          <span class="token key atrule">text</span><span class="token punctuation">:</span> <span class="token string">'已运行时间：'</span>
          <span class="token key atrule">unit</span><span class="token punctuation">:</span> <span class="token string">'天'</span>
        <span class="token key atrule">wordcount</span><span class="token punctuation">:</span>
          <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
          <span class="token key atrule">text</span><span class="token punctuation">:</span> <span class="token string">'本站总字数：'</span>   <span class="token comment"># 需要启用 wordcount</span>
          <span class="token key atrule">unit</span><span class="token punctuation">:</span> <span class="token string">'字'</span>
        <span class="token key atrule">visitcounter</span><span class="token punctuation">:</span>
          <span class="token key atrule">service</span><span class="token punctuation">:</span> busuanzi <span class="token comment"># only busuanzi</span>
          <span class="token key atrule">siteuv</span><span class="token punctuation">:</span>
            <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
            <span class="token key atrule">text</span><span class="token punctuation">:</span> <span class="token string">'本站访客数：'</span>
            <span class="token key atrule">unit</span><span class="token punctuation">:</span> <span class="token string">'人'</span>
          <span class="token key atrule">sitepv</span><span class="token punctuation">:</span>
            <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
            <span class="token key atrule">text</span><span class="token punctuation">:</span> <span class="token string">'本站总访问量：'</span>
            <span class="token key atrule">unit</span><span class="token punctuation">:</span> <span class="token string">'次'</span>
        <span class="token key atrule">lastupd</span><span class="token punctuation">:</span>
          <span class="token key atrule">on</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
          <span class="token key atrule">friendlyShow</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>    <span class="token comment"># 更友好的时间显示</span>
          <span class="token key atrule">text</span><span class="token punctuation">:</span> <span class="token string">'最后活动时间：'</span>
          <span class="token key atrule">unit</span><span class="token punctuation">:</span> <span class="token string">'日'</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h2 id="widget-排序"><a href="#widget-排序" class="headerlink" title="widget 排序"></a>widget 排序</h2><p>只需要配置 <code>order</code>就行。（使用了 Flex 佈局的 order 屬性)，值越小越靠前(靠上)</p>
<h2 id="自定义侧边栏"><a href="#自定义侧边栏" class="headerlink" title="自定义侧边栏"></a>自定义侧边栏</h2><h3 id="创建-widget-yml"><a href="#创建-widget-yml" class="headerlink" title="创建 widget.yml"></a>创建 widget.yml</h3><p>在Hexo博客目錄中的<code>source/_data</code>（如果沒有 _data 文件夾，请自行创建），創建一個文件 <code>widget.yml</code></p>
<h3 id="格式"><a href="#格式" class="headerlink" title="格式"></a>格式</h3><pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token comment"># widget_library 里面的不会出现在sticky区域，也就是不会粘贴在左侧 </span>
<span class="token key atrule">widget_library</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> test_a
  <span class="token key atrule">id_name</span><span class="token punctuation">:</span> test_a
  <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">0</span>
  <span class="token key atrule">name</span><span class="token punctuation">:</span> 这个widget不会粘贴
  <span class="token key atrule">icon</span><span class="token punctuation">:</span> fab fa<span class="token punctuation">-</span>weibo
  <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token string">'#d63130'</span>
  <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
  <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
  <span class="token key atrule">html</span><span class="token punctuation">:</span> <span class="token string">'haha'</span>


<span class="token comment"># widget_library_sticky 里面的会出现在sticky区域，会粘贴在左侧</span>
<span class="token key atrule">widget_library_sticky</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> testWidget
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> testWidget
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 微博热搜
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fab fa<span class="token punctuation">-</span>weibo
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token string">'#d63130'</span>
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> <span class="token string">'xixi'</span>

<span class="token comment"># home_widget里面的内容会出现在座右铭那一个栏目里面</span>
<span class="token key atrule">home_widget</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> welcome
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> welcome
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 欢迎
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> <span class="token string">'针不戳'</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h3 id="参数"><a href="#参数" class="headerlink" title="参数"></a>参数</h3><table>
<thead>
<tr>
<th>参数</th>
<th>解释</th>
</tr>
</thead>
<tbody><tr>
<td>class_name</td>
<td>所创建的 widget 父类 class 名</td>
</tr>
<tr>
<td>id_name</td>
<td>所创建的 widget 父类 id 名</td>
</tr>
<tr>
<td>order</td>
<td>所创建的 widget 排序 （可选）</td>
</tr>
<tr>
<td>name</td>
<td>所创建的 widget 名称</td>
</tr>
<tr>
<td>icon</td>
<td>所创建的 widget 头部的字体图标</td>
</tr>
<tr>
<td>icon_color</td>
<td>所创建的 widget 头部的字体图标的颜色</td>
</tr>
<tr>
<td>url</td>
<td>所创建的 widget 头部点击跳转的链接</td>
</tr>
<tr>
<td>background</td>
<td>所创建的 widget 的背景颜色</td>
</tr>
<tr>
<td>html</td>
<td>所创建的 widget 的相关代码</td>
</tr>
</tbody></table>
<p><img src="https://img13.360buyimg.com/ddimg/jfs/t1/107680/18/15213/224894/6152abeaEce548e69/07ad3d88aa190531.png" class="lazyload placeholder" data-srcset="https://img13.360buyimg.com/ddimg/jfs/t1/107680/18/15213/224894/6152abeaEce548e69/07ad3d88aa190531.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="结构"></p>
<p>生成的代码为</p>
<pre class="line-numbers language-html" data-language="html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>widget test_a<span class="token punctuation">"</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>test_a<span class="token punctuation">"</span></span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">="</span><span class="token attr-value"><span class="token property">order</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span><span class="token property">background</span><span class="token punctuation">:</span> #fff</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>header</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">="</span><span class="token attr-value"><span class="token property">color</span><span class="token punctuation">:</span> #d63130</span><span class="token punctuation">"</span></span> <span class="token attr-name">target</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>_blank<span class="token punctuation">"</span></span> <span class="token attr-name">rel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>noopener<span class="token punctuation">"</span></span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://baidu.com<span class="token punctuation">"</span></span> <span class="token attr-name">data-pjax-state</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>i</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>fab fa-weibo fa-fw<span class="token punctuation">"</span></span> <span class="token attr-name">aria-hidden</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>true<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>i</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>name<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>这个widget不会粘贴<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>header</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>content<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
    haha
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>如果你需要对添加的 widget 进行 UI 调整，请自行添加 css 到 inject 去。</p>
<h3 id="例子"><a href="#例子" class="headerlink" title="例子"></a>例子</h3><h4 id="首页添加github日历"><a href="#首页添加github日历" class="headerlink" title="首页添加github日历"></a>首页添加github日历</h4><p>例如我在``里添加一个github日历，首先我在<code>source</code>文件夹下创建一个js文件<code>/githubcalendar/index.js</code>,  js代码如下:</p>
<details ><summary pointer> github日历js </summary>
              <div class='content'>
              <pre class="line-numbers language-js" data-language="js"><code class="language-js"><span class="token keyword">var</span> <span class="token function-variable function">github_canlendar</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">git_user<span class="token punctuation">,</span> git_color</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">var</span> git_githubapiurl <span class="token operator">=</span> <span class="token string">"https://python-github-calendar-api.vercel.app/api?"</span> <span class="token operator">+</span> git_user<span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_fixed <span class="token operator">=</span> <span class="token string">'fixed'</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_px <span class="token operator">=</span> <span class="token string">'px'</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_month <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'一月'</span><span class="token punctuation">,</span> <span class="token string">'二月'</span><span class="token punctuation">,</span> <span class="token string">'三月'</span><span class="token punctuation">,</span> <span class="token string">'四月'</span><span class="token punctuation">,</span> <span class="token string">'五月'</span><span class="token punctuation">,</span> <span class="token string">'六月'</span><span class="token punctuation">,</span> <span class="token string">'七月'</span><span class="token punctuation">,</span> <span class="token string">'八月'</span><span class="token punctuation">,</span> <span class="token string">'九月'</span><span class="token punctuation">,</span> <span class="token string">'十月'</span><span class="token punctuation">,</span> <span class="token string">'十一月'</span><span class="token punctuation">,</span> <span class="token string">'十二月'</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_monthchange <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_oneyearbeforeday <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_thisday <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_amonthago <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_aweekago <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_weekdatacore <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_datacore <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_total <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_datadate <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_git_data <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_positionplusdata <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_firstweek <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_lastweek <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_beforeweek <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_thisweekdatacore <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_mounthbeforeday <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_mounthfirstindex <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_crispedges <span class="token operator">=</span> <span class="token string">'crispedges'</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_thisdayindex <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_amonthagoindex <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_amonthagoweek <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_firstdate <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_first2date <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_montharrbefore <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_monthindex <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> <span class="token function-variable function">retinaCanvas</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">canvas<span class="token punctuation">,</span> context<span class="token punctuation">,</span> ratio</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>ratio <span class="token operator">></span> <span class="token number">1</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token keyword">var</span> canvasWidth <span class="token operator">=</span> canvas<span class="token punctuation">.</span>width<span class="token punctuation">;</span>
            <span class="token keyword">var</span> canvasHeight <span class="token operator">=</span> canvas<span class="token punctuation">.</span>height<span class="token punctuation">;</span>
            canvas<span class="token punctuation">.</span>width <span class="token operator">=</span> canvasWidth <span class="token operator">*</span> ratio<span class="token punctuation">;</span>
            canvas<span class="token punctuation">.</span>height <span class="token operator">=</span> canvasHeight <span class="token operator">*</span> ratio<span class="token punctuation">;</span>
            canvas<span class="token punctuation">.</span>style<span class="token punctuation">.</span>width <span class="token operator">=</span> <span class="token string">'100%'</span><span class="token punctuation">;</span>
            canvas<span class="token punctuation">.</span>style<span class="token punctuation">.</span>height <span class="token operator">=</span> canvasHeight <span class="token operator">+</span> <span class="token string">'px'</span><span class="token punctuation">;</span>
            context<span class="token punctuation">.</span><span class="token function">scale</span><span class="token punctuation">(</span>ratio<span class="token punctuation">,</span> ratio<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
    <span class="token keyword">function</span> <span class="token function">responsiveChart</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">var</span> ratio <span class="token operator">=</span> window<span class="token punctuation">.</span>devicePixelRatio <span class="token operator">||</span> <span class="token number">1</span>
        <span class="token keyword">var</span> git_tooltip_container <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">'git_tooltip_container'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> git_x <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> git_y <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> git_span1 <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> git_span2 <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> c <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"gitcanvas"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        c<span class="token punctuation">.</span>style<span class="token punctuation">.</span>width <span class="token operator">=</span> <span class="token string">'100%'</span><span class="token punctuation">;</span>
        c<span class="token punctuation">.</span>style<span class="token punctuation">.</span>height <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> cmessage <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"gitmessage"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> ctx <span class="token operator">=</span> c<span class="token punctuation">.</span><span class="token function">getContext</span><span class="token punctuation">(</span><span class="token string">"2d"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        width <span class="token operator">=</span> c<span class="token punctuation">.</span>width <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"gitcalendarcanvasbox"</span><span class="token punctuation">)</span><span class="token punctuation">.</span>offsetWidth<span class="token punctuation">;</span>
        height <span class="token operator">=</span> c<span class="token punctuation">.</span>height <span class="token operator">=</span> <span class="token number">9</span> <span class="token operator">*</span> <span class="token number">0.96</span> <span class="token operator">*</span> c<span class="token punctuation">.</span>width <span class="token operator">/</span> git_data<span class="token punctuation">.</span>length<span class="token punctuation">;</span>
        <span class="token function">retinaCanvas</span><span class="token punctuation">(</span>c<span class="token punctuation">,</span>ctx<span class="token punctuation">,</span> ratio<span class="token punctuation">)</span>
        <span class="token keyword">var</span> linemaxwitdh <span class="token operator">=</span> height<span class="token operator">/</span> <span class="token number">9</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> lineminwitdh <span class="token operator">=</span> <span class="token number">0.8</span> <span class="token operator">*</span> linemaxwitdh<span class="token punctuation">;</span>
        <span class="token keyword">var</span> setposition <span class="token operator">=</span> <span class="token punctuation">&#123;</span>x<span class="token operator">:</span> <span class="token number">0.02</span> <span class="token operator">*</span> width<span class="token punctuation">,</span> y<span class="token operator">:</span> <span class="token number">0.025</span> <span class="token operator">*</span> width<span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
        <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> week <span class="token keyword">in</span> git_data<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            weekdata <span class="token operator">=</span> git_data<span class="token punctuation">[</span>week<span class="token punctuation">]</span><span class="token punctuation">;</span>
            <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> day <span class="token keyword">in</span> weekdata<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
                <span class="token keyword">var</span> dataitem <span class="token operator">=</span> <span class="token punctuation">&#123;</span>date<span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span> count<span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span> x<span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span> y<span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
                git_positionplusdata<span class="token punctuation">.</span><span class="token function">push</span><span class="token punctuation">(</span>dataitem<span class="token punctuation">)</span><span class="token punctuation">;</span>
                ctx<span class="token punctuation">.</span>fillStyle <span class="token operator">=</span> <span class="token function">git_thiscolor</span><span class="token punctuation">(</span>git_color<span class="token punctuation">,</span> weekdata<span class="token punctuation">[</span>day<span class="token punctuation">]</span><span class="token punctuation">.</span>count<span class="token punctuation">)</span><span class="token punctuation">;</span>
                setposition<span class="token punctuation">.</span>y <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span>setposition<span class="token punctuation">.</span>y <span class="token operator">*</span> <span class="token number">100</span><span class="token punctuation">)</span> <span class="token operator">/</span> <span class="token number">100</span><span class="token punctuation">;</span>
                dataitem<span class="token punctuation">.</span>date <span class="token operator">=</span> weekdata<span class="token punctuation">[</span>day<span class="token punctuation">]</span><span class="token punctuation">.</span>date<span class="token punctuation">;</span>
                dataitem<span class="token punctuation">.</span>count <span class="token operator">=</span> weekdata<span class="token punctuation">[</span>day<span class="token punctuation">]</span><span class="token punctuation">.</span>count<span class="token punctuation">;</span>
                dataitem<span class="token punctuation">.</span>x <span class="token operator">=</span> setposition<span class="token punctuation">.</span>x<span class="token punctuation">;</span>
                dataitem<span class="token punctuation">.</span>y <span class="token operator">=</span> setposition<span class="token punctuation">.</span>y<span class="token punctuation">;</span>
                ctx<span class="token punctuation">.</span><span class="token function">fillRect</span><span class="token punctuation">(</span>setposition<span class="token punctuation">.</span>x<span class="token punctuation">,</span> setposition<span class="token punctuation">.</span>y<span class="token punctuation">,</span> lineminwitdh<span class="token punctuation">,</span> lineminwitdh<span class="token punctuation">)</span><span class="token punctuation">;</span>
                setposition<span class="token punctuation">.</span>y <span class="token operator">=</span> setposition<span class="token punctuation">.</span>y <span class="token operator">+</span> linemaxwitdh
            <span class="token punctuation">&#125;</span>
            setposition<span class="token punctuation">.</span>y <span class="token operator">=</span> <span class="token number">0.025</span> <span class="token operator">*</span> width<span class="token punctuation">;</span>
            setposition<span class="token punctuation">.</span>x <span class="token operator">=</span> setposition<span class="token punctuation">.</span>x <span class="token operator">+</span> linemaxwitdh
        <span class="token punctuation">&#125;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>document<span class="token punctuation">.</span>body<span class="token punctuation">.</span>clientWidth <span class="token operator">></span> <span class="token number">700</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            ctx<span class="token punctuation">.</span>font <span class="token operator">=</span> <span class="token string">"600  Arial"</span><span class="token punctuation">;</span>
            ctx<span class="token punctuation">.</span>fillStyle <span class="token operator">=</span> <span class="token string">'#aaa'</span><span class="token punctuation">;</span>
            ctx<span class="token punctuation">.</span><span class="token function">fillText</span><span class="token punctuation">(</span><span class="token string">"日"</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">1.9</span> <span class="token operator">*</span> linemaxwitdh<span class="token punctuation">)</span><span class="token punctuation">;</span>
            ctx<span class="token punctuation">.</span><span class="token function">fillText</span><span class="token punctuation">(</span><span class="token string">"二"</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">3.9</span> <span class="token operator">*</span> linemaxwitdh<span class="token punctuation">)</span><span class="token punctuation">;</span>
            ctx<span class="token punctuation">.</span><span class="token function">fillText</span><span class="token punctuation">(</span><span class="token string">"四"</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">5.9</span> <span class="token operator">*</span> linemaxwitdh<span class="token punctuation">)</span><span class="token punctuation">;</span>
            ctx<span class="token punctuation">.</span><span class="token function">fillText</span><span class="token punctuation">(</span><span class="token string">"六"</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">7.9</span> <span class="token operator">*</span> linemaxwitdh<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">var</span> monthindexlist <span class="token operator">=</span> width <span class="token operator">/</span> <span class="token number">24</span><span class="token punctuation">;</span>
            <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> index <span class="token keyword">in</span> git_monthchange<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
                ctx<span class="token punctuation">.</span><span class="token function">fillText</span><span class="token punctuation">(</span>git_monthchange<span class="token punctuation">[</span>index<span class="token punctuation">]</span><span class="token punctuation">,</span> monthindexlist<span class="token punctuation">,</span> <span class="token number">0.7</span> <span class="token operator">*</span> linemaxwitdh<span class="token punctuation">)</span><span class="token punctuation">;</span>
                monthindexlist <span class="token operator">=</span> monthindexlist <span class="token operator">+</span> width <span class="token operator">/</span> <span class="token number">12</span>
            <span class="token punctuation">&#125;</span>
        <span class="token punctuation">&#125;</span>
        c<span class="token punctuation">.</span><span class="token function-variable function">onmousemove</span> <span class="token operator">=</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">event</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">'.gitmessage'</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
                git_tooltip_container<span class="token punctuation">.</span>innerHTML <span class="token operator">=</span> <span class="token string">""</span>
            <span class="token punctuation">&#125;</span>
            <span class="token function">getMousePos</span><span class="token punctuation">(</span>c<span class="token punctuation">,</span> event<span class="token punctuation">)</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
        git_tooltip_container<span class="token punctuation">.</span><span class="token function-variable function">onmousemove</span> <span class="token operator">=</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">event</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">'.gitmessage'</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
                git_tooltip_container<span class="token punctuation">.</span>innerHTML <span class="token operator">=</span> <span class="token string">""</span>
            <span class="token punctuation">&#125;</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>

        <span class="token keyword">function</span> <span class="token function">getMousePos</span><span class="token punctuation">(</span><span class="token parameter">canvas<span class="token punctuation">,</span> event</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token keyword">var</span> rect <span class="token operator">=</span> canvas<span class="token punctuation">.</span><span class="token function">getBoundingClientRect</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">var</span> x <span class="token operator">=</span> event<span class="token punctuation">.</span>clientX <span class="token operator">-</span> rect<span class="token punctuation">.</span>left <span class="token operator">*</span> <span class="token punctuation">(</span>canvas<span class="token punctuation">.</span>width <span class="token operator">/</span> rect<span class="token punctuation">.</span>width<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">var</span> y <span class="token operator">=</span> event<span class="token punctuation">.</span>clientY <span class="token operator">-</span> rect<span class="token punctuation">.</span>top <span class="token operator">*</span> <span class="token punctuation">(</span>canvas<span class="token punctuation">.</span>height <span class="token operator">/</span> rect<span class="token punctuation">.</span>height<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> item <span class="token keyword">of</span> git_positionplusdata<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
                <span class="token keyword">var</span> lenthx <span class="token operator">=</span> x <span class="token operator">-</span> item<span class="token punctuation">.</span>x<span class="token punctuation">;</span>
                <span class="token keyword">var</span> lenthy <span class="token operator">=</span> y <span class="token operator">-</span> item<span class="token punctuation">.</span>y<span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token number">0</span> <span class="token operator">&lt;</span> lenthx <span class="token operator">&amp;&amp;</span> lenthx <span class="token operator">&lt;</span> lineminwitdh<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
                    <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token number">0</span> <span class="token operator">&lt;</span> lenthy <span class="token operator">&amp;&amp;</span> lenthy <span class="token operator">&lt;</span> lineminwitdh<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
                        git_span1 <span class="token operator">=</span> item<span class="token punctuation">.</span>date<span class="token punctuation">;</span>
                        git_span2 <span class="token operator">=</span> item<span class="token punctuation">.</span>count<span class="token punctuation">;</span>
                        git_x <span class="token operator">=</span> event<span class="token punctuation">.</span>clientX <span class="token operator">-</span> <span class="token number">100</span><span class="token punctuation">;</span>
                        git_y <span class="token operator">=</span> event<span class="token punctuation">.</span>clientY <span class="token operator">-</span> <span class="token number">60</span><span class="token punctuation">;</span>
                        html <span class="token operator">=</span> <span class="token function">tooltip_html</span><span class="token punctuation">(</span>git_x<span class="token punctuation">,</span> git_y<span class="token punctuation">,</span> git_span1<span class="token punctuation">,</span> git_span2<span class="token punctuation">)</span><span class="token punctuation">;</span>
                        <span class="token function">append_div_gitcalendar</span><span class="token punctuation">(</span>git_tooltip_container<span class="token punctuation">,</span> html<span class="token punctuation">)</span>
                    <span class="token punctuation">&#125;</span>
                <span class="token punctuation">&#125;</span>
            <span class="token punctuation">&#125;</span>
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span>

    <span class="token keyword">function</span> <span class="token function">addlastmonth</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>git_thisdayindex <span class="token operator">===</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">52</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">51</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">50</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">49</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">48</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            git_thisweekdatacore <span class="token operator">+=</span> git_firstdate<span class="token punctuation">[</span><span class="token number">6</span><span class="token punctuation">]</span><span class="token punctuation">.</span>count<span class="token punctuation">;</span>
            git_amonthago <span class="token operator">=</span> git_firstdate<span class="token punctuation">[</span><span class="token number">6</span><span class="token punctuation">]</span><span class="token punctuation">.</span>date
        <span class="token punctuation">&#125;</span> <span class="token keyword">else</span> <span class="token punctuation">&#123;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">52</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">51</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">50</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token number">49</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">thisweek2core</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            git_amonthago <span class="token operator">=</span> git_first2date<span class="token punctuation">[</span>git_thisdayindex <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">.</span>date
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span>

    <span class="token keyword">function</span> <span class="token function">thisweek2core</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> i <span class="token operator">=</span> git_thisdayindex <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> git_first2date<span class="token punctuation">.</span>length<span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            git_thisweekdatacore <span class="token operator">+=</span> git_first2date<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">.</span>count
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span>

    <span class="token keyword">function</span> <span class="token function">thisweekcore</span><span class="token punctuation">(</span><span class="token parameter">index</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> item <span class="token keyword">of</span> git_data<span class="token punctuation">[</span>index<span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            git_thisweekdatacore <span class="token operator">+=</span> item<span class="token punctuation">.</span>count
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span>

    <span class="token keyword">function</span> <span class="token function">addlastweek</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> item <span class="token keyword">of</span> git_lastweek<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            git_weekdatacore <span class="token operator">+=</span> item<span class="token punctuation">.</span>count
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span>

    <span class="token keyword">function</span> <span class="token function">addbeforeweek</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">var</span> i <span class="token operator">=</span> git_thisdayindex<span class="token punctuation">;</span> i <span class="token operator">&lt;</span> git_beforeweek<span class="token punctuation">.</span>length<span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            git_weekdatacore <span class="token operator">+=</span> git_beforeweek<span class="token punctuation">[</span>i<span class="token punctuation">]</span><span class="token punctuation">.</span>count
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span>

    <span class="token keyword">function</span> <span class="token function">addweek</span><span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>git_thisdayindex <span class="token operator">===</span> <span class="token number">6</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            git_aweekago <span class="token operator">=</span> git_lastweek<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>date<span class="token punctuation">;</span>
            <span class="token function">addlastweek</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
        <span class="token punctuation">&#125;</span> <span class="token keyword">else</span> <span class="token punctuation">&#123;</span>
            lastweek <span class="token operator">=</span> data<span class="token punctuation">.</span>contributions<span class="token punctuation">[</span><span class="token number">51</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
            git_aweekago <span class="token operator">=</span> lastweek<span class="token punctuation">[</span>git_thisdayindex <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">.</span>date<span class="token punctuation">;</span>
            <span class="token function">addlastweek</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token function">addbeforeweek</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span>

    <span class="token function">fetch</span><span class="token punctuation">(</span>git_githubapiurl<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">data</span> <span class="token operator">=></span> data<span class="token punctuation">.</span><span class="token function">json</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token parameter">data</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
        git_data <span class="token operator">=</span> data<span class="token punctuation">.</span>contributions<span class="token punctuation">;</span>
        git_total <span class="token operator">=</span> data<span class="token punctuation">.</span>total<span class="token punctuation">;</span>
        git_first2date <span class="token operator">=</span> git_data<span class="token punctuation">[</span><span class="token number">48</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        git_firstdate <span class="token operator">=</span> git_data<span class="token punctuation">[</span><span class="token number">47</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        git_firstweek <span class="token operator">=</span> data<span class="token punctuation">.</span>contributions<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        git_lastweek <span class="token operator">=</span> data<span class="token punctuation">.</span>contributions<span class="token punctuation">[</span><span class="token number">52</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        git_beforeweek <span class="token operator">=</span> data<span class="token punctuation">.</span>contributions<span class="token punctuation">[</span><span class="token number">51</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        git_thisdayindex <span class="token operator">=</span> git_lastweek<span class="token punctuation">.</span>length <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span>
        git_thisday <span class="token operator">=</span> git_lastweek<span class="token punctuation">[</span>git_thisdayindex<span class="token punctuation">]</span><span class="token punctuation">.</span>date<span class="token punctuation">;</span>
        git_oneyearbeforeday <span class="token operator">=</span> git_firstweek<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>date<span class="token punctuation">;</span>
        git_monthindex <span class="token operator">=</span> git_thisday<span class="token punctuation">.</span><span class="token function">substring</span><span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">)</span> <span class="token operator">*</span> <span class="token number">1</span><span class="token punctuation">;</span>
        git_montharrbefore <span class="token operator">=</span> git_month<span class="token punctuation">.</span><span class="token function">splice</span><span class="token punctuation">(</span>git_monthindex<span class="token punctuation">,</span> <span class="token number">12</span> <span class="token operator">-</span> git_monthindex<span class="token punctuation">)</span><span class="token punctuation">;</span>
        git_monthchange <span class="token operator">=</span> git_montharrbefore<span class="token punctuation">.</span><span class="token function">concat</span><span class="token punctuation">(</span>git_month<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token function">addweek</span><span class="token punctuation">(</span>data<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token function">addlastmonth</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> html <span class="token operator">=</span> <span class="token function">github_main_box</span><span class="token punctuation">(</span>git_monthchange<span class="token punctuation">,</span> git_data<span class="token punctuation">,</span> git_user<span class="token punctuation">,</span> git_color<span class="token punctuation">,</span> git_total<span class="token punctuation">,</span> git_thisweekdatacore<span class="token punctuation">,</span> git_weekdatacore<span class="token punctuation">,</span> git_oneyearbeforeday<span class="token punctuation">,</span> git_thisday<span class="token punctuation">,</span> git_aweekago<span class="token punctuation">,</span> git_amonthago<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token function">append_div_gitcalendar</span><span class="token punctuation">(</span>github_container<span class="token punctuation">,</span> html<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">if</span><span class="token punctuation">(</span>document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">'github_loading'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">&#123;</span>
            document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">'github_loading'</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">remove</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
        <span class="token function">responsiveChart</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">catch</span><span class="token punctuation">(</span><span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token parameter">error</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span>error<span class="token punctuation">)</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
      window<span class="token punctuation">.</span><span class="token function">addEventListener</span><span class="token punctuation">(</span><span class="token string">'resize'</span><span class="token punctuation">,</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token function">responsiveChart</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
    window<span class="token punctuation">.</span><span class="token function">addEventListener</span><span class="token punctuation">(</span><span class="token string">'scroll'</span><span class="token punctuation">,</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">if</span> <span class="token punctuation">(</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">'.gitmessage'</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        git_tooltip_container<span class="token punctuation">.</span>innerHTML <span class="token operator">=</span> <span class="token string">""</span>
    <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
    <span class="token keyword">var</span> <span class="token function-variable function">git_thiscolor</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">color<span class="token punctuation">,</span> x</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>x <span class="token operator">===</span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token keyword">var</span> i <span class="token operator">=</span> <span class="token function">parseInt</span><span class="token punctuation">(</span>x <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">return</span> color<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span>
        <span class="token punctuation">&#125;</span> <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>x <span class="token operator">&lt;</span> <span class="token number">2</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token keyword">return</span> color<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span>
        <span class="token punctuation">&#125;</span> <span class="token keyword">else</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>x <span class="token operator">&lt;</span> <span class="token number">20</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token keyword">var</span> i <span class="token operator">=</span> <span class="token function">parseInt</span><span class="token punctuation">(</span>x <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">return</span> color<span class="token punctuation">[</span>i<span class="token punctuation">]</span>
        <span class="token punctuation">&#125;</span> <span class="token keyword">else</span> <span class="token punctuation">&#123;</span>
            <span class="token keyword">return</span> color<span class="token punctuation">[</span><span class="token number">9</span><span class="token punctuation">]</span>
        <span class="token punctuation">&#125;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> <span class="token function-variable function">tooltip_html</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">x<span class="token punctuation">,</span> y<span class="token punctuation">,</span> span1<span class="token punctuation">,</span> span2</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">var</span> html <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
        html <span class="token operator">+=</span> <span class="token string">'&lt;div class="gitmessage" style="top:'</span> <span class="token operator">+</span> y <span class="token operator">+</span> <span class="token string">'px;left:'</span> <span class="token operator">+</span> x <span class="token operator">+</span> <span class="token string">'px;position: fixed;z-index:9999">&lt;div class="angle-wrapper" style="display:block;">&lt;span>'</span> <span class="token operator">+</span> span1 <span class="token operator">+</span> <span class="token string">'&amp;nbsp;&lt;/span>&lt;span>'</span> <span class="token operator">+</span> span2 <span class="token operator">+</span> <span class="token string">' 次上传&lt;/span>&lt;/div>&lt;/div>'</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> html
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> <span class="token function-variable function">github_canvas_box</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">var</span> html <span class="token operator">=</span> <span class="token string">'&lt;div id="gitcalendarcanvasbox"> &lt;canvas id="gitcanvas" style="animation: none;">&lt;/canvas>&lt;/div>'</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> html
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> <span class="token function-variable function">github_info_box</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">user<span class="token punctuation">,</span> color</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">var</span> html <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
        html <span class="token operator">+=</span> <span class="token string">'&lt;div id="git_tooltip_container">&lt;/div>&lt;div class="contrib-footer clearfix mt-1 mx-3 px-3 pb-1">&lt;div class="float-left text-gray">数据来源 &lt;a href="https://github.com/'</span> <span class="token operator">+</span> user <span class="token operator">+</span> <span class="token string">'" target="blank">@'</span> <span class="token operator">+</span> user <span class="token operator">+</span> <span class="token string">'&lt;/a>&lt;/div>&lt;div class="contrib-legend text-gray">Less &lt;ul class="legend">&lt;li style="background-color:'</span> <span class="token operator">+</span> color<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token operator">+</span> <span class="token string">'">&lt;/li>&lt;li style="background-color:'</span> <span class="token operator">+</span> color<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span> <span class="token operator">+</span> <span class="token string">'">&lt;/li>&lt;li style="background-color:'</span> <span class="token operator">+</span> color<span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span> <span class="token operator">+</span> <span class="token string">'">&lt;/li>&lt;li style="background-color:'</span> <span class="token operator">+</span> color<span class="token punctuation">[</span><span class="token number">6</span><span class="token punctuation">]</span> <span class="token operator">+</span> <span class="token string">'">&lt;/li>&lt;li style="background-color:'</span> <span class="token operator">+</span> color<span class="token punctuation">[</span><span class="token number">8</span><span class="token punctuation">]</span> <span class="token operator">+</span> <span class="token string">'">&lt;/li>&lt;/ul>More &lt;/div>&lt;/div>'</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> html
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> <span class="token function-variable function">github_main_box</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">monthchange<span class="token punctuation">,</span> git_data<span class="token punctuation">,</span> user<span class="token punctuation">,</span> color<span class="token punctuation">,</span> total<span class="token punctuation">,</span> thisweekdatacore<span class="token punctuation">,</span> weekdatacore<span class="token punctuation">,</span> oneyearbeforeday<span class="token punctuation">,</span> thisday<span class="token punctuation">,</span> aweekago<span class="token punctuation">,</span> amonthago</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">var</span> html <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> canvasbox <span class="token operator">=</span> <span class="token function">github_canvas_box</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> infobox <span class="token operator">=</span> <span class="token function">github_info_box</span><span class="token punctuation">(</span>user<span class="token punctuation">,</span> color<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">var</span> style <span class="token operator">=</span> <span class="token function">github_main_style</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        html <span class="token operator">+=</span> <span class="token string">'&lt;div class="position-relative">&lt;div class="border py-2 graph-before-activity-overview">&lt;div class="js-gitcalendar-graph mx-md-2 mx-3 d-flex flex-column flex-items-end flex-xl-items-center overflow-hidden pt-1 is-graph-loading graph-canvas gitcalendar-graph height-full text-center">'</span> <span class="token operator">+</span> canvasbox <span class="token operator">+</span> <span class="token string">'&lt;/div>'</span> <span class="token operator">+</span> infobox <span class="token operator">+</span> <span class="token string">'&lt;/div>&lt;/div>'</span><span class="token punctuation">;</span>
        html <span class="token operator">+=</span> <span class="token string">'&lt;div style="display:flex;width:100%">&lt;div class="contrib-column contrib-column-first table-column">&lt;span class="text-muted">过去一年提交&lt;/span>&lt;span class="contrib-number">'</span> <span class="token operator">+</span> total <span class="token operator">+</span> <span class="token string">'&lt;/span>&lt;span class="text-muted">'</span> <span class="token operator">+</span> oneyearbeforeday <span class="token operator">+</span> <span class="token string">'&amp;nbsp;-&amp;nbsp;'</span> <span class="token operator">+</span> thisday <span class="token operator">+</span> <span class="token string">'&lt;/span>&lt;/div>&lt;div class="contrib-column table-column">&lt;span class="text-muted">最近一月提交&lt;/span>&lt;span class="contrib-number">'</span> <span class="token operator">+</span> thisweekdatacore <span class="token operator">+</span> <span class="token string">'&lt;/span>&lt;span class="text-muted">'</span> <span class="token operator">+</span> amonthago <span class="token operator">+</span> <span class="token string">'&amp;nbsp;-&amp;nbsp;'</span> <span class="token operator">+</span> thisday <span class="token operator">+</span> <span class="token string">'&lt;/span>&lt;/div>&lt;div class="contrib-column table-column">&lt;span class="text-muted">最近一周提交&lt;/span>&lt;span class="contrib-number">'</span> <span class="token operator">+</span> weekdatacore <span class="token operator">+</span> <span class="token string">'&lt;/span>&lt;span class="text-muted">'</span> <span class="token operator">+</span> aweekago <span class="token operator">+</span> <span class="token string">'&amp;nbsp;-&amp;nbsp;'</span> <span class="token operator">+</span> thisday <span class="token operator">+</span> <span class="token string">'&lt;/span>&lt;/div>&lt;/div>'</span> <span class="token operator">+</span> style<span class="token punctuation">;</span>
        <span class="token keyword">return</span> html
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> <span class="token function-variable function">github_main_style</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
        style <span class="token operator">=</span> <span class="token string">'&lt;style>#github_container&#123;text-align:center;margin:0 auto;width:100%;display:flex;display:-webkit-flex;justify-content:center;align-items:center;flex-wrap:wrap;&#125;.gitcalendar-graph text.wday,.gitcalendar-graph text.month&#123;font-size:10px;fill:#aaa;&#125;.contrib-legend&#123;text-align:right;padding:0 14px 10px 0;display:inline-block;float:right;&#125;.contrib-legend .legend&#123;display:inline-block;list-style:none;margin:0 5px;position:relative;bottom:-1px;padding:0;&#125;.contrib-legend .legend li&#123;display:inline-block;width:10px;height:10px;&#125;.text-small&#123;font-size:12px;color:#767676;&#125;.gitcalendar-graph&#123;padding:15px 0 0;text-align:center;&#125;.contrib-column&#123;text-align:center;border-left:1px solid #ddd;border-top:1px solid #ddd;font-size:11px;&#125;.contrib-column-first&#123;border-left:0;&#125;.table-column&#123;padding:10px;display:table-cell;flex:1;vertical-align:top;&#125;.contrib-number&#123;font-weight:300;line-height:1.3em;font-size:24px;display:block;&#125;.gitcalendar img.spinner&#123;width:70px;margin-top:50px;min-height:70px;&#125;.monospace&#123;text-align:center;color:#000;font-family:monospace;&#125;.monospace a&#123;color:#1D75AB;text-decoration:none;&#125;.contrib-footer&#123;font-size:11px;padding:0 10px 12px;text-align:left;width:100%;box-sizing:border-box;height:26px;&#125;.left.text-muted&#123;float:left;margin-left:9px;color:#767676;&#125;.left.text-muted a&#123;color:#4078c0;text-decoration:none;&#125;.left.text-muted a:hover,.monospace a:hover&#123;text-decoration:underline;&#125;h2.f4.text-normal.mb-3&#123;display:none;&#125;.float-left.text-gray&#123;float:left;&#125;#user-activity-overview&#123;display:none;&#125;.day-tooltip&#123;white-space:nowrap;position:absolute;z-index:99999;padding:10px;font-size:12px;color:#959da5;text-align:center;background:rgba(0,0,0,.85);border-radius:3px;display:none;pointer-events:none;&#125;.day-tooltip strong&#123;color:#dfe2e5;&#125;.day-tooltip.is-visible&#123;display:block;&#125;.day-tooltip:after&#123;position:absolute;bottom:-10px;left:50%;width:5px;height:5px;box-sizing:border-box;margin:0 0 0 -5px;content:" ";border:5px solid transparent;border-top-color:rgba(0,0,0,.85)&#125;.position-relative&#123;width:100%;&#125;@media screen and (max-width:650px)&#123;.contrib-column&#123;display:none&#125;&#125;.angle-wrapper&#123;z-index:9999;display:inline;width:200px;height:40px;position:relative;padding:5px 0;background:rgba(0,0,0,0.8);border-radius:8px;text-align:center;color:white;&#125;.angle-box&#123;position:fixed;padding:10px&#125;.angle-wrapper span&#123;padding-bottom:1em;&#125;.angle-wrapper:before&#123;content:"";width:0;height:0;border:10px solid transparent;border-top-color:rgba(0,0,0,0.8);position:absolute;left:47.5%;top:100%;&#125;&lt;/style>'</span><span class="token punctuation">;</span>
        <span class="token keyword">return</span> style
    <span class="token punctuation">&#125;</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
<span class="token keyword">var</span> <span class="token function-variable function">append_div_gitcalendar</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">parent<span class="token punctuation">,</span> text</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token keyword">typeof</span> text <span class="token operator">===</span> <span class="token string">'string'</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
        <span class="token keyword">var</span> temp <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">createElement</span><span class="token punctuation">(</span><span class="token string">'div'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        temp<span class="token punctuation">.</span>innerHTML <span class="token operator">=</span> text<span class="token punctuation">;</span>
        <span class="token keyword">var</span> frag <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">createDocumentFragment</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">while</span> <span class="token punctuation">(</span>temp<span class="token punctuation">.</span>firstChild<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            frag<span class="token punctuation">.</span><span class="token function">appendChild</span><span class="token punctuation">(</span>temp<span class="token punctuation">.</span>firstChild<span class="token punctuation">)</span>
        <span class="token punctuation">&#125;</span>
        parent<span class="token punctuation">.</span><span class="token function">appendChild</span><span class="token punctuation">(</span>frag<span class="token punctuation">)</span>
    <span class="token punctuation">&#125;</span> <span class="token keyword">else</span> <span class="token punctuation">&#123;</span>
        parent<span class="token punctuation">.</span><span class="token function">appendChild</span><span class="token punctuation">(</span>text<span class="token punctuation">)</span>
    <span class="token punctuation">&#125;</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
<span class="token keyword">var</span> <span class="token function-variable function">loading_git</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token parameter">color</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
    loading <span class="token operator">=</span> <span class="token string">'&lt;div id="github_loading" style="width:10%;height:100%;margin:0 auto;display: block">&lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  viewBox="0 0 50 50" style="enable-background:new 0 0 50 50" xml:space="preserve">&lt;path fill="'</span> <span class="token operator">+</span> color <span class="token operator">+</span> <span class="token string">'" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" transform="rotate(275.098 25 25)">&lt;animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite">&lt;/animateTransform>&lt;/path>&lt;/svg>&lt;/div>'</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> loading
<span class="token punctuation">&#125;</span><span class="token punctuation">;</span>

<span class="token punctuation">(</span><span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">&#123;</span>
    <span class="token keyword">var</span> git_user <span class="token operator">=</span> <span class="token string">'yuang01'</span><span class="token punctuation">;</span> <span class="token comment">// 这里更改为你的github 用户名</span>
    <span class="token keyword">var</span> github_container <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">'github_container'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> github_loading <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">'github_loading'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_purple <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'#ebedf0'</span><span class="token punctuation">,</span> <span class="token string">'#fdcdec'</span><span class="token punctuation">,</span> <span class="token string">'#fc9bd9'</span><span class="token punctuation">,</span> <span class="token string">'#fa6ac5'</span><span class="token punctuation">,</span> <span class="token string">'#f838b2'</span><span class="token punctuation">,</span> <span class="token string">'#f5089f'</span><span class="token punctuation">,</span> <span class="token string">'#c4067e'</span><span class="token punctuation">,</span> <span class="token string">'#92055e'</span><span class="token punctuation">,</span> <span class="token string">'#540336'</span><span class="token punctuation">,</span> <span class="token string">'#48022f'</span><span class="token punctuation">,</span> <span class="token string">'#30021f'</span><span class="token punctuation">,</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_green <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'#ebedf0'</span><span class="token punctuation">,</span> <span class="token string">'#f0fff4'</span><span class="token punctuation">,</span> <span class="token string">'#dcffe4'</span><span class="token punctuation">,</span> <span class="token string">'#bef5cb'</span><span class="token punctuation">,</span> <span class="token string">'#85e89d'</span><span class="token punctuation">,</span> <span class="token string">'#34d058'</span><span class="token punctuation">,</span> <span class="token string">'#28a745'</span><span class="token punctuation">,</span> <span class="token string">'#22863a'</span><span class="token punctuation">,</span> <span class="token string">'#176f2c'</span><span class="token punctuation">,</span> <span class="token string">'#165c26'</span><span class="token punctuation">,</span> <span class="token string">'#144620'</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_blue <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'#ebedf0'</span><span class="token punctuation">,</span> <span class="token string">'#f1f8ff'</span><span class="token punctuation">,</span> <span class="token string">'#dbedff'</span><span class="token punctuation">,</span> <span class="token string">'#c8e1ff'</span><span class="token punctuation">,</span> <span class="token string">'#79b8ff'</span><span class="token punctuation">,</span> <span class="token string">'#2188ff'</span><span class="token punctuation">,</span> <span class="token string">'#0366d6'</span><span class="token punctuation">,</span> <span class="token string">'#005cc5'</span><span class="token punctuation">,</span> <span class="token string">'#044289'</span><span class="token punctuation">,</span> <span class="token string">'#032f62'</span><span class="token punctuation">,</span> <span class="token string">'#05264c'</span><span class="token punctuation">,</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
    <span class="token keyword">var</span> git_color <span class="token operator">=</span> git_green<span class="token punctuation">;</span>
    <span class="token keyword">if</span> <span class="token punctuation">(</span>github_container<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token function">append_div_gitcalendar</span><span class="token punctuation">(</span>github_container<span class="token punctuation">,</span> <span class="token function">loading_git</span><span class="token punctuation">(</span>git_color<span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
      <span class="token function">github_canlendar</span><span class="token punctuation">(</span>git_user<span class="token punctuation">,</span> git_color<span class="token punctuation">)</span>
    <span class="token punctuation">&#125;</span> <span class="token keyword">else</span> <span class="token punctuation">&#123;</span>
      console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'nonono'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span>
    
<span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
    <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>

<p>将 <code>270</code>行的<code>git_user</code>改为你自己的用户名<br>然后在 自定义侧边栏的<code>home_widget</code>中写入以下内容:</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">home_widget</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> my_github_container
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> my_github_container
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 测试日历
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
      &lt;div id="github_container"<span class="token punctuation">></span>&lt;/div<span class="token punctuation">></span>
      &lt;script data<span class="token punctuation">-</span>pjax src="/githubcalendar/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
    '<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>然后就会在首页出现github日历图<br><img src="https://img13.360buyimg.com/ddimg/jfs/t1/209326/24/2496/37863/6152b6d3E7762f687/3438ceef175cbc59.png" class="lazyload placeholder" data-srcset="https://img13.360buyimg.com/ddimg/jfs/t1/209326/24/2496/37863/6152b6d3E7762f687/3438ceef175cbc59.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="github日历图"></p>
<h3 id="添加IP签名档"><a href="#添加IP签名档" class="headerlink" title="添加IP签名档"></a>添加IP签名档</h3><pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">home_widget</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> welcome
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> welcome
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 欢迎
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> <span class="token string">'&lt;img src="https://api.amogu.cn/api/ipimg/" style="width:100%">'</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p><img src="https://img11.360buyimg.com/ddimg/jfs/t1/209759/11/2601/1358816/6152bb30E44fe6be5/96861371c579252e.png" class="lazyload placeholder" data-srcset="https://img11.360buyimg.com/ddimg/jfs/t1/209759/11/2601/1358816/6152bb30E44fe6be5/96861371c579252e.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="IP签名档"></p>
<h3 id="添加轮播图"><a href="#添加轮播图" class="headerlink" title="添加轮播图"></a>添加轮播图</h3><p>同样在<code>source</code>文件夹下创建<code>mySwiper/index.js</code>和<code>mySwiper/index.css</code>文件，然后创建<code>mySwiper/img</code>文件夹，用于存放图片，轮播图嘛，肯定要图片。</p>
<details ><summary pointer> mySwiper/index.js </summary>
              <div class='content'>
              <p>js用vue写的，因为主题已经引入了vue版本的swiper轮播图插件, 当然你也可以引入jquery插件，用jquery来写，都可以的。</p><pre class="line-numbers language-js" data-language="js"><code class="language-js"><span class="token comment">// 如果想变换轮播方式等，进阶的话，可以看这个 https://github.surmon.me/vue-awesome-swiper/</span>
<span class="token comment">// 当然你也可以引入jquery插件，都可以的, 不只是轮播图，其他特效也可以</span>
<span class="token keyword">new</span> <span class="token class-name">Vue</span><span class="token punctuation">(</span><span class="token punctuation">&#123;</span>
  el<span class="token operator">:</span> <span class="token string">"#mySwiper"</span><span class="token punctuation">,</span>
  <span class="token function-variable function">data</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">return</span> <span class="token punctuation">&#123;</span>
      swiperOption<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
        direction<span class="token operator">:</span> <span class="token string">"vertical"</span><span class="token punctuation">,</span> <span class="token comment">// 这个是竖着的</span>
        slidesPerView<span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
        spaceBetween<span class="token operator">:</span> <span class="token number">30</span><span class="token punctuation">,</span>
        mousewheel<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token comment">// 注释上面的四个，则水平方向轮播</span>
        pagination<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
          el<span class="token operator">:</span> <span class="token string">".swiper-pagination"</span><span class="token punctuation">,</span>
          clickable<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
        <span class="token comment">// 注释掉上面这个，则不显示小点点</span>
        loop<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">// 循环</span>
        autoplay<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
          delay<span class="token operator">:</span> <span class="token number">2500</span><span class="token punctuation">,</span>
          disableOnInteraction<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">,</span> <span class="token comment">// 自动播放,注释掉则不自动播放</span>
        on<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
          <span class="token function-variable function">init</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token function">swiperAnimateCache</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//隐藏动画元素</span>
            <span class="token function">swiperAnimate</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//初始化完成开始动画</span>
          <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
          <span class="token function-variable function">slideChangeTransitionEnd</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
            <span class="token function">swiperAnimate</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">//每个slide切换结束时也运行当前slide动画</span>
          <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
        <span class="token comment">// or data-swiper-parallax="-100"</span>
        <span class="token comment">// 上面是文字动画效果，注释则取消文字动画，动画效果参见 https://www.swiper.com.cn/usage/animate/index.html</span>
      <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  computed<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
    <span class="token function">swiper</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token punctuation">.</span>$refs<span class="token punctuation">.</span>myswiper<span class="token punctuation">.</span>$swiper<span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  methods<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
    <span class="token comment">// 鼠标移入停止轮播</span>
    <span class="token function">stopAutoPlay</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>swiperOption<span class="token punctuation">.</span>autoplay <span class="token operator">&amp;&amp;</span> <span class="token keyword">this</span><span class="token punctuation">.</span>swiper<span class="token punctuation">.</span>autoplay<span class="token punctuation">.</span><span class="token function">stop</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    <span class="token comment">// 鼠标移出开始轮播</span>
    <span class="token function">startAutoPlay</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>swiperOption<span class="token punctuation">.</span>autoplay <span class="token operator">&amp;&amp;</span> <span class="token keyword">this</span><span class="token punctuation">.</span>swiper<span class="token punctuation">.</span>autoplay<span class="token punctuation">.</span><span class="token function">start</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>


<details ><summary pointer> mySwiper/index.css </summary>
              <div class='content'>
              <pre class="line-numbers language-css" data-language="css"><code class="language-css">
<span class="token selector">.myswiper .swiper-slide</span> <span class="token punctuation">&#123;</span>
    <span class="token property">position</span><span class="token punctuation">:</span> relative<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>

<span class="token selector">.myswiper .swiper-slide p</span> <span class="token punctuation">&#123;</span>
    <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
    <span class="token property">font-size</span><span class="token punctuation">:</span> 18px<span class="token punctuation">;</span>
    <span class="token property">top</span><span class="token punctuation">:</span> 50px<span class="token punctuation">;</span>
    <span class="token property">left</span><span class="token punctuation">:</span> 10px<span class="token punctuation">;</span>
    <span class="token property">z-index</span><span class="token punctuation">:</span> 9999<span class="token punctuation">;</span>
    <span class="token property">color</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.myswiper .swiper-slide a.toPath</span> <span class="token punctuation">&#123;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> block<span class="token punctuation">;</span>
    <span class="token property">width</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
    <span class="token property">height</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.myswiper .swiper-slide h2</span> <span class="token punctuation">&#123;</span>
    <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
    <span class="token property">top</span><span class="token punctuation">:</span> 10px<span class="token punctuation">;</span>
    <span class="token property">left</span><span class="token punctuation">:</span> 10px<span class="token punctuation">;</span>
    <span class="token property">z-index</span><span class="token punctuation">:</span> 9999<span class="token punctuation">;</span>
    <span class="token property">color</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span>
    <span class="token property">font-size</span><span class="token punctuation">:</span> 24px<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.myswiper .swiper-slide img</span> <span class="token punctuation">&#123;</span>
    <span class="token property">filter</span><span class="token punctuation">:</span> <span class="token function">brightness</span><span class="token punctuation">(</span>0.8<span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">/* 图片变暗 ,字体看得清 */</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.myswiper.swiper-container-vertical .swiper-pagination-bullet-active</span> <span class="token punctuation">&#123;</span>
    <span class="token property">height</span><span class="token punctuation">:</span> 30px<span class="token punctuation">;</span>
    <span class="token property">border-radius</span><span class="token punctuation">:</span> 10px<span class="token punctuation">;</span>
    <span class="token property">transition</span><span class="token punctuation">:</span> all 0.3s<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>

<span class="token comment">/* 暗黑模式样式在  .darkModel &#123; &#125;  类下 */</span>
<span class="token comment">/* 例如 
    .darkModel .aaa &#123;
        color: #c9d1d9;
    &#125;
&#125; */</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>

<p>最后在自定义侧边栏的<code>home_widget</code>写上</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">home_widget</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> test2_swiper
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> test2_swiper
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 测试轮播图
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
    &lt;div id="mySwiper" @mouseenter="stopAutoPlay()" @mouseleave="startAutoPlay()"<span class="token punctuation">></span>
      &lt;swiper class="myswiper" ref="myswiper" style="height<span class="token punctuation">:</span>350px;" <span class="token punctuation">:</span>options="swiperOption"<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/2.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述哦&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/3.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题2&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述2&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/4.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题3&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述3&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/5.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题4&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述4&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//api.dujin.org/pic/ghibli/" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题5&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述5&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/7.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题6&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述6&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;<span class="token tag">!--</span> 如果你想继续增加轮播图，继续在下面写&lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>我是内容&lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>就行了 <span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">></span><span class="token scalar string">
        &lt;div class="swiper-pagination" slot="pagination">&lt;/div></span>

      &lt;/swiper<span class="token punctuation">></span>
    &lt;/div<span class="token punctuation">></span>

    &lt;script src="/mySwiper/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
    &lt;link href="/mySwiper/index.css" rel="stylesheet"<span class="token punctuation">></span>
    '<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>注意，请自行修改a链接地址和图片地址和标题名称和描述</p>
<pre class="line-numbers language-html" data-language="html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>swiper-slide</span><span class="token punctuation">></span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://baidu.com<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>toPath<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>  <span class="token comment">&lt;!-- a链接地址 --></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>img</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>no-lazy<span class="token punctuation">"</span></span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>/mySwiper/img/2.jpg<span class="token punctuation">"</span></span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">="</span><span class="token attr-value"><span class="token property">width</span><span class="token punctuation">:</span>100%<span class="token punctuation">;</span><span class="token property">height</span><span class="token punctuation">:</span>100%<span class="token punctuation">;</span><span class="token property">object-fit</span><span class="token punctuation">:</span> cover<span class="token punctuation">;</span></span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span>  <span class="token comment">&lt;!-- 图片地址 --></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ani<span class="token punctuation">"</span></span> <span class="token attr-name">swiper-animate-effect</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>fadeInDown<span class="token punctuation">"</span></span> <span class="token attr-name">swiper-animate-duration</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>0.5s<span class="token punctuation">"</span></span> <span class="token attr-name">swiper-animate-delay</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>0.3s<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>我是标题<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span> <span class="token comment">&lt;!-- 修改标题名称 --></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ani<span class="token punctuation">"</span></span> <span class="token attr-name">swiper-animate-effect</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>fadeInDown<span class="token punctuation">"</span></span> <span class="token attr-name">swiper-animate-duration</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>0.5s<span class="token punctuation">"</span></span> <span class="token attr-name">swiper-animate-delay</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>0.3s<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>我是描述哦<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span> <span class="token comment">&lt;!-- 修改描述 --></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>a</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>swiper-slide</span><span class="token punctuation">></span></span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>如果你想加轮播图或者删除轮播图，则增加或者删除上面这个模块就行了，这样，一个轮播图就放在了首页。<br><img src="https://img12.360buyimg.com/ddimg/jfs/t1/157070/18/25566/1656690/6152dc57E2b0f3df1/0b6c5731c4138a28.png" class="lazyload placeholder" data-srcset="https://img12.360buyimg.com/ddimg/jfs/t1/157070/18/25566/1656690/6152dc57E2b0f3df1/0b6c5731c4138a28.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="自定义轮播图"></p>
<h3 id="横向滚动特效"><a href="#横向滚动特效" class="headerlink" title="横向滚动特效"></a>横向滚动特效</h3><p>首先需要在<code>source</code>文件夹下创建<code>bli/index.js</code>和<code>bli/index.css</code>文件</p>
<details ><summary pointer> bli/index.js </summary>
              <div class='content'>
              <pre class="line-numbers language-js" data-language="js"><code class="language-js"><span class="token comment">// 主题已经默认cdn引入了vue-seamless-scroll插件</span>
<span class="token comment">// https://chenxuan0000.github.io/vue-seamless-scroll/zh/guide/01-basic.html</span>
<span class="token keyword">new</span> <span class="token class-name">Vue</span><span class="token punctuation">(</span><span class="token punctuation">&#123;</span>
  el<span class="token operator">:</span> <span class="token string">"#myBli"</span><span class="token punctuation">,</span> <span class="token comment">// el不要是最外面的id_name，应该是html: ''里的div的id</span>
  <span class="token function-variable function">data</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">return</span> <span class="token punctuation">&#123;</span>
      content<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
      listData<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">3</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
      classOption<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
        limitMoveNum<span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
        direction<span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
      <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  methods<span class="token operator">:</span> <span class="token punctuation">&#123;</span><span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>

<details ><summary pointer> bli/index.css </summary>
              <div class='content'>
              <pre class="line-numbers language-css" data-language="css"><code class="language-css"><span class="token selector">#myBli .warp</span> <span class="token punctuation">&#123;</span>
  <span class="token property">width</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
  <span class="token property">height</span><span class="token punctuation">:</span> 120px<span class="token punctuation">;</span>
  <span class="token property">margin</span><span class="token punctuation">:</span> 0 auto<span class="token punctuation">;</span>
  <span class="token property">overflow</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">#myBli .warp ul</span> <span class="token punctuation">&#123;</span>
  <span class="token property">list-style</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span>
  <span class="token property">padding</span><span class="token punctuation">:</span> 0<span class="token punctuation">;</span>
  <span class="token property">margin</span><span class="token punctuation">:</span> 0 auto<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">#myBli .warp ul.ul-item</span> <span class="token punctuation">&#123;</span>
  <span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">#myBli .warp ul.ul-item .li-item</span> <span class="token punctuation">&#123;</span>
  <span class="token property">width</span><span class="token punctuation">:</span> 120px<span class="token punctuation">;</span>
  <span class="token property">display</span><span class="token punctuation">:</span> block<span class="token punctuation">;</span>
  <span class="token property">height</span><span class="token punctuation">:</span> 120px<span class="token punctuation">;</span>
  <span class="token property">margin-right</span><span class="token punctuation">:</span> 10px<span class="token punctuation">;</span>
  <span class="token property">line-height</span><span class="token punctuation">:</span> 120px<span class="token punctuation">;</span>
  <span class="token property">background-color</span><span class="token punctuation">:</span> #999<span class="token punctuation">;</span>
  <span class="token property">color</span><span class="token punctuation">:</span> #fff<span class="token punctuation">;</span>
  <span class="token property">text-align</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
  <span class="token property">font-size</span><span class="token punctuation">:</span> 30px<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>

<span class="token selector">#myBli .warp ul.ul-item img</span> <span class="token punctuation">&#123;</span>
  <span class="token property">width</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
  <span class="token property">height</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
  <span class="token property">object-fit</span><span class="token punctuation">:</span> cover<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>
<p>最后在自定义侧边栏的<code>home_widget</code>中加入以下内容:</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">home_widget</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> mybilibili
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> mybilibili
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 测试bli
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
      &lt;div id="myBli"<span class="token punctuation">></span>
        &lt;vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll
          <span class="token punctuation">:</span>data="listData"
          <span class="token punctuation">:</span>class<span class="token punctuation">-</span>option="classOption"
          class="warp"
        <span class="token punctuation">></span>
          &lt;ul class="ul<span class="token punctuation">-</span>item" style="width<span class="token punctuation">:</span>720px;"<span class="token punctuation">></span>
            &lt;<span class="token tag">!--</span> 在这里改<span class="token punctuation">,</span> 手动修改a连接的href值和img的src值<span class="token punctuation">,</span> 如果你会进阶，你可以使用v<span class="token punctuation">-</span>for<span class="token punctuation">,</span> 或者数据使用动态数据<span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">></span><span class="token scalar string">
            
            &lt;li class="li-item">
              &lt;a href="http://baidu.com">
                &lt;img class="no-lazy" src="https://pic4.zhimg.com/80/v2-f549722dac8f777693c090a92498de0f_1440w.jpg">
              &lt;/a>
            &lt;/li></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>
            &lt;<span class="token tag">!--</span> 在这里结束 <span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">></span><span class="token scalar string">
          &lt;/ul></span>
        &lt;/vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll<span class="token punctuation">></span>
      &lt;/div<span class="token punctuation">></span>

      &lt;script src="/bli/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
      &lt;link href="/bli/index.css" rel="stylesheet"<span class="token punctuation">></span>
    '<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>同样，自行修改上面a标签的链接和图片地址，至此横向滚动特效完成。</p>
<blockquote>
<p>注意，使用vue写法的话，图片需要带上class=”no-lazy”，否则可能加载不出来，，js原生或者jquery不需要带</p>
</blockquote>
<p><img src="https://img13.360buyimg.com/ddimg/jfs/t1/204201/29/8717/1295226/6152de69E4b27f8fe/3442e5daeb9dbdb6.png" class="lazyload placeholder" data-srcset="https://img13.360buyimg.com/ddimg/jfs/t1/204201/29/8717/1295226/6152de69E4b27f8fe/3442e5daeb9dbdb6.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="横向滚动特效"></p>
<h3 id="侧边栏增加微博热搜"><a href="#侧边栏增加微博热搜" class="headerlink" title="侧边栏增加微博热搜"></a>侧边栏增加微博热搜</h3><p>同样同样，在<code>source</code>文件夹下创建<code>weibo/index.js</code>和<code>weibo/index.css</code>文件</p>
<details ><summary pointer> weibo/index.js </summary>
              <div class='content'>
              <p>又是vue写的，哈哈，随便用啥写</p><pre class="line-numbers language-js" data-language="js"><code class="language-js"><span class="token keyword">new</span> <span class="token class-name">Vue</span><span class="token punctuation">(</span><span class="token punctuation">&#123;</span>
  el<span class="token operator">:</span> <span class="token string">"#myWeibo"</span><span class="token punctuation">,</span> <span class="token comment">// el不要是最外面的id_name，应该是html: ''里的div的id</span>
  <span class="token function-variable function">data</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">return</span> <span class="token punctuation">&#123;</span>
      content<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
      classOption<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
        singleHeight<span class="token operator">:</span> <span class="token number">30</span><span class="token punctuation">,</span>
      <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  <span class="token function">created</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">getWeiboList</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  methods<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
    <span class="token comment">// 请求开源api, 获取历史上的今天数据</span>
    <span class="token function">getWeiboList</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token function">fetch</span><span class="token punctuation">(</span><span class="token string">"https://tenapi.cn/resou/"</span><span class="token punctuation">,</span> <span class="token punctuation">&#123;</span>
        method<span class="token operator">:</span> <span class="token string">"GET"</span><span class="token punctuation">,</span> <span class="token comment">// *GET, POST, PUT, DELETE, etc.</span>
      <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">res</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
          <span class="token keyword">return</span> res<span class="token punctuation">.</span><span class="token function">json</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
          <span class="token keyword">this</span><span class="token punctuation">.</span>content <span class="token operator">=</span> data<span class="token punctuation">.</span>list<span class="token punctuation">;</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">catch</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">err</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
          console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">"err"</span><span class="token punctuation">,</span> err<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>

<details ><summary pointer> weibo/index.css </summary>
              <div class='content'>
              <pre class="line-numbers language-css" data-language="css"><code class="language-css"><span class="token selector">.weibo-container</span> <span class="token punctuation">&#123;</span>
    <span class="token property">width</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
    <span class="token property">line-height</span><span class="token punctuation">:</span> 30px<span class="token punctuation">;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
    <span class="token property">justify-content</span><span class="token punctuation">:</span> space-between<span class="token punctuation">;</span>
    <span class="token property">font-size</span><span class="token punctuation">:</span> 12px<span class="token punctuation">;</span>
    <span class="token property">height</span><span class="token punctuation">:</span> 30px<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.weibo-container .left</span> <span class="token punctuation">&#123;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.weibo-container .name</span> <span class="token punctuation">&#123;</span>
    <span class="token property">margin-left</span><span class="token punctuation">:</span> 5px<span class="token punctuation">;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> -webkit-box<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-orient</span><span class="token punctuation">:</span> vertical<span class="token punctuation">;</span>
    <span class="token property">-webkit-line-clamp</span><span class="token punctuation">:</span> 1<span class="token punctuation">;</span>
    <span class="token property">overflow</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">#myWeibo .warp</span> <span class="token punctuation">&#123;</span>
    <span class="token property">height</span><span class="token punctuation">:</span> 300px<span class="token punctuation">;</span>
    <span class="token property">width</span><span class="token punctuation">:</span> 100%<span class="token punctuation">;</span>
    <span class="token property">margin</span><span class="token punctuation">:</span> 0 auto<span class="token punctuation">;</span>
    <span class="token property">overflow</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.weibo-container .order</span> <span class="token punctuation">&#123;</span>
    <span class="token property">color</span><span class="token punctuation">:</span> #fe962e<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.weibo-container .name a</span><span class="token punctuation">&#123;</span>
    <span class="token property">color</span><span class="token punctuation">:</span> black<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.weibo-container .name a:hover</span> <span class="token punctuation">&#123;</span>
    <span class="token property">text-decoration</span><span class="token punctuation">:</span> underline<span class="token punctuation">;</span>
    <span class="token property">color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token selector">.weibo-container .red</span> <span class="token punctuation">&#123;</span>
    <span class="token property">color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>

<p>最后在自定义侧边栏的<code>widget_library_sticky</code>或者<code>widget_library</code>中加入html,</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">widget_library_sticky</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> testWidget
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> testWidget
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 微博热搜
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fab fa<span class="token punctuation">-</span>weibo
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token string">'#d63130'</span>
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
      &lt;div id="myWeibo"<span class="token punctuation">></span>

      &lt;<span class="token tag">!--</span> 如果不要滚动，则去掉 vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll标签就行了，这个插件使用cdn向左向右滚动好像有问题 <span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">></span>

        &lt;vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll
          <span class="token punctuation">:</span>data="content"
          <span class="token punctuation">:</span>class<span class="token punctuation">-</span>option="classOption"
          class="warp"
        <span class="token punctuation">></span>
          &lt;div class="weibo<span class="token punctuation">-</span>container" v<span class="token punctuation">-</span>for="(item<span class="token punctuation">,</span> index) in content" <span class="token punctuation">:</span>key="index"<span class="token punctuation">></span>
            &lt;div class="left"<span class="token punctuation">></span>
              &lt;div class="order" <span class="token punctuation">:</span>class="<span class="token punctuation">&#123;</span> <span class="token key atrule">red</span><span class="token punctuation">:</span> index&lt;=2 <span class="token punctuation">&#125;</span>"<span class="token punctuation">></span><span class="token punctuation">&#123;</span><span class="token punctuation">&#123;</span>index + 1<span class="token punctuation">&#125;</span><span class="token punctuation">&#125;</span>&lt;/div<span class="token punctuation">></span>
              &lt;div class="name"<span class="token punctuation">></span>&lt;a <span class="token punctuation">:</span>href="item.url" target="_blank"<span class="token punctuation">></span><span class="token punctuation">&#123;</span><span class="token punctuation">&#123;</span>item.name<span class="token punctuation">&#125;</span><span class="token punctuation">&#125;</span>&lt;/a<span class="token punctuation">></span>&lt;/div<span class="token punctuation">></span>
            &lt;/div<span class="token punctuation">></span>
            &lt;div class="hot"<span class="token punctuation">></span><span class="token punctuation">&#123;</span><span class="token punctuation">&#123;</span>item.hot<span class="token punctuation">&#125;</span><span class="token punctuation">&#125;</span>&lt;/div<span class="token punctuation">></span>
          &lt;/div<span class="token punctuation">></span>
        &lt;/vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll<span class="token punctuation">></span>
      &lt;/div<span class="token punctuation">></span>

      &lt;script src="/weibo/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
      &lt;link href="/weibo/index.css" rel="stylesheet"<span class="token punctuation">></span>
    '<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>这样，热搜侧边栏也弄好了，如果不要热搜榜滚动的话，自己去掉<code>&lt;vue-seamless-scroll&gt;&lt;/vue-seamless-scroll&gt;</code>这个html标签就行了</p>
<h3 id="历史上的今天"><a href="#历史上的今天" class="headerlink" title="历史上的今天"></a>历史上的今天</h3><p>嘿嘿，同样要在<code>source</code>文件夹下创建<code>historyToday/index.js</code>文件，好吧，我写累了</p>
<details ><summary pointer> historyToday/index.js </summary>
              <div class='content'>
              <p>又是vue.js写的，无所谓，不需要看懂, 复制粘贴就行</p><pre class="line-numbers language-js" data-language="js"><code class="language-js"><span class="token comment">// 如果想变换轮播方式等，进阶的话，可以看这个 https://github.surmon.me/vue-awesome-swiper/</span>
<span class="token comment">// 当然你也可以引入jquery插件，都可以的, 不只是轮播图，其他特效也可以</span>
<span class="token keyword">new</span> <span class="token class-name">Vue</span><span class="token punctuation">(</span><span class="token punctuation">&#123;</span>
  el<span class="token operator">:</span> <span class="token string">"#myHistorySwiper"</span><span class="token punctuation">,</span> <span class="token comment">// el不要是最外面的id_name，应该是html: ''里的div的id</span>
  <span class="token function-variable function">data</span><span class="token operator">:</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">return</span> <span class="token punctuation">&#123;</span>
      swiperOption<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
        effect<span class="token operator">:</span> <span class="token string">"cube"</span><span class="token punctuation">,</span> <span class="token comment">// 轮播特效</span>
        loop<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span> <span class="token comment">// 循环</span>
        autoplay<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
          delay<span class="token operator">:</span> <span class="token number">2500</span><span class="token punctuation">,</span>
          disableOnInteraction<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
      <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
      content<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  computed<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
    <span class="token function">swiper</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token punctuation">.</span>$refs<span class="token punctuation">.</span>myhistoryswiper<span class="token punctuation">.</span>$swiper<span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  <span class="token function">created</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">getHistoryList</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  methods<span class="token operator">:</span> <span class="token punctuation">&#123;</span>
    <span class="token comment">// 鼠标移入停止轮播</span>
    <span class="token function">stopAutoPlay</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>swiperOption<span class="token punctuation">.</span>autoplay <span class="token operator">&amp;&amp;</span> <span class="token keyword">this</span><span class="token punctuation">.</span>swiper<span class="token punctuation">.</span>autoplay<span class="token punctuation">.</span><span class="token function">stop</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    <span class="token comment">// 鼠标移出开始轮播</span>
    <span class="token function">startAutoPlay</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>swiperOption<span class="token punctuation">.</span>autoplay <span class="token operator">&amp;&amp;</span> <span class="token keyword">this</span><span class="token punctuation">.</span>swiper<span class="token punctuation">.</span>autoplay<span class="token punctuation">.</span><span class="token function">start</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
    <span class="token comment">// 请求开源api, 获取历史上的今天数据</span>
    <span class="token function">getHistoryList</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
      <span class="token function">fetch</span><span class="token punctuation">(</span><span class="token string">"https://tenapi.cn/lishi/?format=json"</span><span class="token punctuation">,</span> <span class="token punctuation">&#123;</span>
        method<span class="token operator">:</span> <span class="token string">"GET"</span><span class="token punctuation">,</span> <span class="token comment">// *GET, POST, PUT, DELETE, etc.</span>
      <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">res</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
          <span class="token keyword">return</span> res<span class="token punctuation">.</span><span class="token function">json</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">data</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
          <span class="token keyword">this</span><span class="token punctuation">.</span>content <span class="token operator">=</span> data<span class="token punctuation">.</span>content<span class="token punctuation">;</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">)</span>
        <span class="token punctuation">.</span><span class="token function">catch</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">err</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">&#123;</span>
          console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">"err"</span><span class="token punctuation">,</span> err<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
  <span class="token punctuation">&#125;</span><span class="token punctuation">,</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>
<p>最后在自定义侧边栏的<code>widget_library_sticky</code>或者<code>widget_library</code>中加入html,</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">widget_library_sticky</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> historyToday
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> historyToday
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 历史上的今天
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>calendar<span class="token punctuation">-</span>week
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token string">'#d63130'</span>
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
      &lt;div id="myHistorySwiper" @mouseenter="stopAutoPlay()" @mouseleave="startAutoPlay()"<span class="token punctuation">></span>
        &lt;swiper class="myhistoryswiper" ref="myhistoryswiper" style="height<span class="token punctuation">:</span>80px;" <span class="token punctuation">:</span>options="swiperOption"<span class="token punctuation">></span>
          &lt;swiper<span class="token punctuation">-</span>slide v<span class="token punctuation">-</span>for="(item<span class="token punctuation">,</span> index) in content" <span class="token punctuation">:</span>key="index"<span class="token punctuation">></span>
            <span class="token punctuation">&#123;</span><span class="token punctuation">&#123;</span>item<span class="token punctuation">&#125;</span><span class="token punctuation">&#125;</span>
          &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">></span>
      &lt;/div<span class="token punctuation">></span>
      &lt;script src="/historyToday/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
    '<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>这样历史上的今天就完成了<br><img src="https://img10.360buyimg.com/ddimg/jfs/t1/207640/15/2697/1253849/6152e283Ec5fbadf5/f7cf99b009c9c8dc.png" class="lazyload placeholder" data-srcset="https://img10.360buyimg.com/ddimg/jfs/t1/207640/15/2697/1253849/6152e283Ec5fbadf5/f7cf99b009c9c8dc.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="历史上的今天"></p>
<h3 id="恋爱墙"><a href="#恋爱墙" class="headerlink" title="恋爱墙"></a>恋爱墙</h3><p>在<code>source</code>文件夹下创建<code>love/index.js</code>文件</p>
<details ><summary pointer> love/index.js </summary>
              <div class='content'>
              <pre class="line-numbers language-js" data-language="js"><code class="language-js"><span class="token keyword">var</span> htmer_time <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span><span class="token string">"htmer_time"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">var</span> htmer_time_time <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>

<span class="token keyword">function</span> <span class="token function">setTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
  <span class="token keyword">var</span> create_time <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span>
    <span class="token keyword">new</span> <span class="token class-name">Date</span><span class="token punctuation">(</span>Date<span class="token punctuation">.</span><span class="token constant">UTC</span><span class="token punctuation">(</span><span class="token number">2018</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">,</span> <span class="token number">26</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">45</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">/</span> <span class="token number">1000</span>
  <span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">var</span> timestamp <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span>
    <span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">Date</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token number">8</span> <span class="token operator">*</span> <span class="token number">60</span> <span class="token operator">*</span> <span class="token number">60</span> <span class="token operator">*</span> <span class="token number">1000</span><span class="token punctuation">)</span> <span class="token operator">/</span> <span class="token number">1000</span>
  <span class="token punctuation">)</span><span class="token punctuation">;</span>
  currentTime <span class="token operator">=</span> <span class="token function">secondToDate</span><span class="token punctuation">(</span>timestamp <span class="token operator">-</span> create_time<span class="token punctuation">)</span><span class="token punctuation">;</span>
  currentTimeHtml <span class="token operator">=</span>
    currentTime<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token operator">+</span>
    <span class="token string">" 年 "</span> <span class="token operator">+</span>
    currentTime<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span> <span class="token operator">+</span>
    <span class="token string">" 天 "</span> <span class="token operator">+</span>
    currentTime<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span> <span class="token operator">+</span>
    <span class="token string">" 时 "</span> <span class="token operator">+</span>
    currentTime<span class="token punctuation">[</span><span class="token number">3</span><span class="token punctuation">]</span> <span class="token operator">+</span>
    <span class="token string">" 分 "</span> <span class="token operator">+</span>
    currentTime<span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span> <span class="token operator">+</span>
    <span class="token string">" 秒"</span><span class="token punctuation">;</span>
  htmer_time<span class="token punctuation">.</span>innerHTML <span class="token operator">=</span> currentTimeHtml<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span class="token keyword">function</span> <span class="token function">secondToDate</span><span class="token punctuation">(</span><span class="token parameter">second</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span>second<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    <span class="token keyword">return</span> <span class="token number">0</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span>
  <span class="token keyword">var</span> time <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Array</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>second <span class="token operator">>=</span> <span class="token number">365</span> <span class="token operator">*</span> <span class="token number">24</span> <span class="token operator">*</span> <span class="token number">3600</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    time<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token function">parseInt</span><span class="token punctuation">(</span>second <span class="token operator">/</span> <span class="token punctuation">(</span><span class="token number">365</span> <span class="token operator">*</span> <span class="token number">24</span> <span class="token operator">*</span> <span class="token number">3600</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    second <span class="token operator">%=</span> <span class="token number">365</span> <span class="token operator">*</span> <span class="token number">24</span> <span class="token operator">*</span> <span class="token number">3600</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>second <span class="token operator">>=</span> <span class="token number">24</span> <span class="token operator">*</span> <span class="token number">3600</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    time<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token function">parseInt</span><span class="token punctuation">(</span>second <span class="token operator">/</span> <span class="token punctuation">(</span><span class="token number">24</span> <span class="token operator">*</span> <span class="token number">3600</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    second <span class="token operator">%=</span> <span class="token number">24</span> <span class="token operator">*</span> <span class="token number">3600</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>second <span class="token operator">>=</span> <span class="token number">3600</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    time<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token function">parseInt</span><span class="token punctuation">(</span>second <span class="token operator">/</span> <span class="token number">3600</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    second <span class="token operator">%=</span> <span class="token number">3600</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>second <span class="token operator">>=</span> <span class="token number">60</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    time<span class="token punctuation">[</span><span class="token number">3</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token function">parseInt</span><span class="token punctuation">(</span>second <span class="token operator">/</span> <span class="token number">60</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    second <span class="token operator">%=</span> <span class="token number">60</span><span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>second <span class="token operator">></span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
    time<span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span> <span class="token operator">=</span> second<span class="token punctuation">;</span>
  <span class="token punctuation">&#125;</span>
  <span class="token keyword">return</span> time<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>

<span class="token keyword">if</span> <span class="token punctuation">(</span>htmer_time<span class="token punctuation">)</span> <span class="token punctuation">&#123;</span>
  htmer_time_time <span class="token operator">=</span> <span class="token function">setInterval</span><span class="token punctuation">(</span>setTime<span class="token punctuation">,</span> <span class="token number">1000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span> <span class="token keyword">else</span> <span class="token punctuation">&#123;</span>
  <span class="token function">clearInterval</span><span class="token punctuation">(</span>htmer_time_time<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>
<p>在第6行修改时间就行了，改成你自己想要开始的时间，这里是2018年10月26号开始的<br>最后在自定义侧边栏的<code>widget_library_sticky</code>或者<code>widget_library</code>中加入html</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">widget_library_sticky</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> testLove
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> testLove
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 恋爱墙
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>heart
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token string">'#d63130'</span>
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
    
      &lt;div style="text<span class="token punctuation">-</span><span class="token key atrule">align</span><span class="token punctuation">:</span> center;"<span class="token punctuation">></span>
        &lt;img src="https<span class="token punctuation">:</span>//a<span class="token punctuation">-</span>oss.zmki.cn/20190601/img_9879.jpg"
          <span class="token key atrule">style="width</span><span class="token punctuation">:</span> <span class="token key atrule">50px;height</span><span class="token punctuation">:</span> <span class="token key atrule">50px;vertical-align</span><span class="token punctuation">:</span> <span class="token key atrule">-20px;border-radius</span><span class="token punctuation">:</span> <span class="token key atrule">50%;margin-right</span><span class="token punctuation">:</span> <span class="token key atrule">5px;margin-bottom</span><span class="token punctuation">:</span> <span class="token key atrule">5px;-webkit-box-shadow</span><span class="token punctuation">:</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>0.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token key atrule">0.1);box-shadow</span><span class="token punctuation">:</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>0.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token key atrule">0.1);border</span><span class="token punctuation">:</span> 2px solid <span class="token comment">#fff;" /></span>
        &lt;svg viewbox="0 0 1024 1024" style="margin<span class="token punctuation">-</span><span class="token key atrule">left</span><span class="token punctuation">:</span> <span class="token key atrule">5px;margin-right</span><span class="token punctuation">:</span> 5px;" version="1.0" width="15" height="15"
          class="my<span class="token punctuation">-</span>face"<span class="token punctuation">></span>
          &lt;path
            d="M863.597631 513.574282l<span class="token punctuation">-</span>271.33965<span class="token punctuation">-</span>140.213484L729.783667 81.926656c3.583731<span class="token punctuation">-</span>7.87141 7.167462<span class="token punctuation">-</span>15.742819 7.167462<span class="token punctuation">-</span>25.214109C736.887134 25.226908 708.345275 0.012799 672.635953 0.012799a63.611229 63.611229 0 0 0<span class="token punctuation">-</span>39.293053 12.607055c<span class="token punctuation">-</span>1.791866 1.59988<span class="token punctuation">-</span>3.519736 3.19976<span class="token punctuation">-</span>5.311602 3.19976L147.87531 418.925381a55.547834 55.547834 0 0 0<span class="token punctuation">-</span>19.646527 47.356448c1.791866 17.278704 14.27093 33.021523 32.125591 42.492813l271.33965 141.749369L292.504463 945.221908c<span class="token punctuation">-</span>12.479064 25.214109<span class="token punctuation">-</span>1.791866 53.563983 23.166262 69.306802 10.751194 6.335525 23.230258 9.47129 35.709322 9.47129 16.062795 0 32.125591<span class="token punctuation">-</span>4.735645 44.604655<span class="token punctuation">-</span>15.742819l480.091993<span class="token punctuation">-</span>403.297753a55.547834 55.547834 0 0 0 19.646526<span class="token punctuation">-</span>47.228458 61.243407 61.243407 0 0 0<span class="token punctuation">-</span>32.12559<span class="token punctuation">-</span>44.156688z"
            fill="<span class="token comment">#515151" /></span>
        &lt;/svg<span class="token punctuation">></span>
        &lt;img src="https<span class="token punctuation">:</span>//a<span class="token punctuation">-</span>oss.zmki.cn/20190601/img_9878.jpg"
          <span class="token key atrule">style="width</span><span class="token punctuation">:</span> <span class="token key atrule">50px;height</span><span class="token punctuation">:</span> <span class="token key atrule">50px;vertical-align</span><span class="token punctuation">:</span> <span class="token key atrule">-20px;border-radius</span><span class="token punctuation">:</span> <span class="token key atrule">50%;margin-left</span><span class="token punctuation">:</span> <span class="token key atrule">5px;margin-bottom</span><span class="token punctuation">:</span> <span class="token key atrule">5px;-webkit-box-shadow</span><span class="token punctuation">:</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>0.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token key atrule">0.1);box-shadow</span><span class="token punctuation">:</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>0.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token key atrule">0.1);border</span><span class="token punctuation">:</span> 2px solid <span class="token comment">#fff;" />&lt;br /></span>
        &lt;span id="htmer_time"<span class="token punctuation">></span>&lt;/span<span class="token punctuation">></span>
      &lt;/div<span class="token punctuation">></span>

      &lt;script data<span class="token punctuation">-</span>pjax src="/love/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
    '<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>这样，恋爱墙就完成了，但是，除了修改时间，你还可以把两张图片地址也修改成你自己的图片地址<br><img src="https://img13.360buyimg.com/ddimg/jfs/t1/207293/17/2693/1405780/6152e217Ebfe5263a/f2bb2529adb8de88.png" class="lazyload placeholder" data-srcset="https://img13.360buyimg.com/ddimg/jfs/t1/207293/17/2693/1405780/6152e217Ebfe5263a/f2bb2529adb8de88.png" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="恋爱墙"></p>
<p>这几个模块就相当于给你一个容器，你可以自己往里面方html，然后放js，css，放一些自己的插件，vue.js,jquery.js，原生js都可以，只是提供一个容器，你可以自己搞更好看更好玩的扩展，如果你懒得折腾，用我上面写的扩展（自定义侧边栏）也挺好的。</p>
<p>最后我将我的<code>source/_data/widget.yml</code>写法贴下来,如下所示</p>
<details ><summary pointer> source/_data/widget.yml </summary>
              <div class='content'>
              <pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">widget_library</span><span class="token punctuation">:</span>

<span class="token key atrule">widget_library_sticky</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> testWidget
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> testWidget
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 微博热搜
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fab fa<span class="token punctuation">-</span>weibo
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token string">'#d63130'</span>
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
      &lt;div id="myWeibo"<span class="token punctuation">></span>

      &lt;<span class="token tag">!--</span> 如果不要滚动，则去掉 vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll标签就行了，这个插件使用cdn向左向右滚动好像有问题 <span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">></span>

        &lt;vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll
          <span class="token punctuation">:</span>data="content"
          <span class="token punctuation">:</span>class<span class="token punctuation">-</span>option="classOption"
          class="warp"
        <span class="token punctuation">></span>
          &lt;div class="weibo<span class="token punctuation">-</span>container" v<span class="token punctuation">-</span>for="(item<span class="token punctuation">,</span> index) in content" <span class="token punctuation">:</span>key="index"<span class="token punctuation">></span>
            &lt;div class="left"<span class="token punctuation">></span>
              &lt;div class="order" <span class="token punctuation">:</span>class="<span class="token punctuation">&#123;</span> <span class="token key atrule">red</span><span class="token punctuation">:</span> index&lt;=2 <span class="token punctuation">&#125;</span>"<span class="token punctuation">></span><span class="token punctuation">&#123;</span><span class="token punctuation">&#123;</span>index + 1<span class="token punctuation">&#125;</span><span class="token punctuation">&#125;</span>&lt;/div<span class="token punctuation">></span>
              &lt;div class="name"<span class="token punctuation">></span>&lt;a <span class="token punctuation">:</span>href="item.url" target="_blank"<span class="token punctuation">></span><span class="token punctuation">&#123;</span><span class="token punctuation">&#123;</span>item.name<span class="token punctuation">&#125;</span><span class="token punctuation">&#125;</span>&lt;/a<span class="token punctuation">></span>&lt;/div<span class="token punctuation">></span>
            &lt;/div<span class="token punctuation">></span>
            &lt;div class="hot"<span class="token punctuation">></span><span class="token punctuation">&#123;</span><span class="token punctuation">&#123;</span>item.hot<span class="token punctuation">&#125;</span><span class="token punctuation">&#125;</span>&lt;/div<span class="token punctuation">></span>
          &lt;/div<span class="token punctuation">></span>
        &lt;/vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll<span class="token punctuation">></span>
      &lt;/div<span class="token punctuation">></span>

      &lt;script src="/weibo/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
      &lt;link href="/weibo/index.css" rel="stylesheet"<span class="token punctuation">></span>
    '
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> historyToday
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> historyToday
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 历史上的今天
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>calendar<span class="token punctuation">-</span>week
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token string">'#d63130'</span>
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
      &lt;div id="myHistorySwiper" @mouseenter="stopAutoPlay()" @mouseleave="startAutoPlay()"<span class="token punctuation">></span>
        &lt;swiper class="myhistoryswiper" ref="myhistoryswiper" style="height<span class="token punctuation">:</span>80px;" <span class="token punctuation">:</span>options="swiperOption"<span class="token punctuation">></span>
          &lt;swiper<span class="token punctuation">-</span>slide v<span class="token punctuation">-</span>for="(item<span class="token punctuation">,</span> index) in content" <span class="token punctuation">:</span>key="index"<span class="token punctuation">></span>
            <span class="token punctuation">&#123;</span><span class="token punctuation">&#123;</span>item<span class="token punctuation">&#125;</span><span class="token punctuation">&#125;</span>
          &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">></span>
      &lt;/div<span class="token punctuation">></span>
      &lt;script src="/historyToday/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
    '
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> testLove
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> testLove
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 恋爱墙
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>heart
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> <span class="token string">'#d63130'</span>
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
    
      &lt;div style="text<span class="token punctuation">-</span><span class="token key atrule">align</span><span class="token punctuation">:</span> center;"<span class="token punctuation">></span>
        &lt;img src="https<span class="token punctuation">:</span>//a<span class="token punctuation">-</span>oss.zmki.cn/20190601/img_9879.jpg"
          <span class="token key atrule">style="width</span><span class="token punctuation">:</span> <span class="token key atrule">50px;height</span><span class="token punctuation">:</span> <span class="token key atrule">50px;vertical-align</span><span class="token punctuation">:</span> <span class="token key atrule">-20px;border-radius</span><span class="token punctuation">:</span> <span class="token key atrule">50%;margin-right</span><span class="token punctuation">:</span> <span class="token key atrule">5px;margin-bottom</span><span class="token punctuation">:</span> <span class="token key atrule">5px;-webkit-box-shadow</span><span class="token punctuation">:</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>0.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token key atrule">0.1);box-shadow</span><span class="token punctuation">:</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>0.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token key atrule">0.1);border</span><span class="token punctuation">:</span> 2px solid <span class="token comment">#fff;" /></span>
        &lt;svg viewbox="0 0 1024 1024" style="margin<span class="token punctuation">-</span><span class="token key atrule">left</span><span class="token punctuation">:</span> <span class="token key atrule">5px;margin-right</span><span class="token punctuation">:</span> 5px;" version="1.0" width="15" height="15"
          class="my<span class="token punctuation">-</span>face"<span class="token punctuation">></span>
          &lt;path
            d="M863.597631 513.574282l<span class="token punctuation">-</span>271.33965<span class="token punctuation">-</span>140.213484L729.783667 81.926656c3.583731<span class="token punctuation">-</span>7.87141 7.167462<span class="token punctuation">-</span>15.742819 7.167462<span class="token punctuation">-</span>25.214109C736.887134 25.226908 708.345275 0.012799 672.635953 0.012799a63.611229 63.611229 0 0 0<span class="token punctuation">-</span>39.293053 12.607055c<span class="token punctuation">-</span>1.791866 1.59988<span class="token punctuation">-</span>3.519736 3.19976<span class="token punctuation">-</span>5.311602 3.19976L147.87531 418.925381a55.547834 55.547834 0 0 0<span class="token punctuation">-</span>19.646527 47.356448c1.791866 17.278704 14.27093 33.021523 32.125591 42.492813l271.33965 141.749369L292.504463 945.221908c<span class="token punctuation">-</span>12.479064 25.214109<span class="token punctuation">-</span>1.791866 53.563983 23.166262 69.306802 10.751194 6.335525 23.230258 9.47129 35.709322 9.47129 16.062795 0 32.125591<span class="token punctuation">-</span>4.735645 44.604655<span class="token punctuation">-</span>15.742819l480.091993<span class="token punctuation">-</span>403.297753a55.547834 55.547834 0 0 0 19.646526<span class="token punctuation">-</span>47.228458 61.243407 61.243407 0 0 0<span class="token punctuation">-</span>32.12559<span class="token punctuation">-</span>44.156688z"
            fill="<span class="token comment">#515151" /></span>
        &lt;/svg<span class="token punctuation">></span>
        &lt;img src="https<span class="token punctuation">:</span>//a<span class="token punctuation">-</span>oss.zmki.cn/20190601/img_9878.jpg"
          <span class="token key atrule">style="width</span><span class="token punctuation">:</span> <span class="token key atrule">50px;height</span><span class="token punctuation">:</span> <span class="token key atrule">50px;vertical-align</span><span class="token punctuation">:</span> <span class="token key atrule">-20px;border-radius</span><span class="token punctuation">:</span> <span class="token key atrule">50%;margin-left</span><span class="token punctuation">:</span> <span class="token key atrule">5px;margin-bottom</span><span class="token punctuation">:</span> <span class="token key atrule">5px;-webkit-box-shadow</span><span class="token punctuation">:</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>0.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token key atrule">0.1);box-shadow</span><span class="token punctuation">:</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>0.1)<span class="token punctuation">,</span> 1px 1px 1px rgba(0<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token key atrule">0.1);border</span><span class="token punctuation">:</span> 2px solid <span class="token comment">#fff;" />&lt;br /></span>
        &lt;span id="htmer_time"<span class="token punctuation">></span>&lt;/span<span class="token punctuation">></span>
      &lt;/div<span class="token punctuation">></span>

      &lt;script data<span class="token punctuation">-</span>pjax src="/love/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
    '

<span class="token key atrule">home_widget</span><span class="token punctuation">:</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> welcome
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> welcome
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 欢迎
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> <span class="token string">'&lt;img src="https://api.amogu.cn/api/ipimg/" style="width:100%">'</span>
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> my_github_container
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> my_github_container
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 测试日历
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
      &lt;div id="github_container"<span class="token punctuation">></span>&lt;/div<span class="token punctuation">></span>
      &lt;script data<span class="token punctuation">-</span>pjax src="/githubcalendar/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
    '
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> test2
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> test2
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 测试轮播图
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
    &lt;div id="mySwiper" @mouseenter="stopAutoPlay()" @mouseleave="startAutoPlay()"<span class="token punctuation">></span>
      &lt;swiper class="myswiper" ref="myswiper" style="height<span class="token punctuation">:</span>350px;" <span class="token punctuation">:</span>options="swiperOption"<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/2.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述哦&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/3.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题2&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述2&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/4.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题3&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述3&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/5.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题4&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述4&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//api.dujin.org/pic/ghibli/" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题5&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述5&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>
          &lt;a href="http<span class="token punctuation">:</span>//baidu.com" class="toPath"<span class="token punctuation">></span>
            &lt;img class="no<span class="token punctuation">-</span>lazy" src="/mySwiper/img/7.jpg" style="width<span class="token punctuation">:</span><span class="token key atrule">100%;height:100%;object-fit</span><span class="token punctuation">:</span> cover;"<span class="token punctuation">></span>
            &lt;h2 class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是标题6&lt;/h2<span class="token punctuation">></span>
            &lt;p class="ani" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>effect="fadeInDown" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>duration="0.5s" swiper<span class="token punctuation">-</span>animate<span class="token punctuation">-</span>delay="0.3s"<span class="token punctuation">></span>我是描述6&lt;/p<span class="token punctuation">></span>
          &lt;/a<span class="token punctuation">></span>
        &lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>

        &lt;<span class="token tag">!--</span> 如果你想继续增加轮播图，继续在下面写&lt;swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>我是内容&lt;/swiper<span class="token punctuation">-</span>slide<span class="token punctuation">></span>就行了 <span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">></span><span class="token scalar string">
        &lt;div class="swiper-pagination" slot="pagination">&lt;/div></span>

      &lt;/swiper<span class="token punctuation">></span>
    &lt;/div<span class="token punctuation">></span>

    &lt;script src="/mySwiper/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
    &lt;link href="/mySwiper/index.css" rel="stylesheet"<span class="token punctuation">></span>
    '
  <span class="token punctuation">-</span> <span class="token key atrule">class_name</span><span class="token punctuation">:</span> mybilibili
    <span class="token key atrule">id_name</span><span class="token punctuation">:</span> mybilibili
    <span class="token key atrule">order</span><span class="token punctuation">:</span> <span class="token number">-1</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> 测试bli
    <span class="token key atrule">icon</span><span class="token punctuation">:</span> fas fa<span class="token punctuation">-</span>envelope
    <span class="token key atrule">icon_color</span><span class="token punctuation">:</span> blue
    <span class="token key atrule">url</span><span class="token punctuation">:</span> http<span class="token punctuation">:</span>//baidu.com
    <span class="token key atrule">background</span><span class="token punctuation">:</span> <span class="token string">'#fff'</span>
    <span class="token key atrule">html</span><span class="token punctuation">:</span> '
      &lt;div id="myBli"<span class="token punctuation">></span>
        &lt;vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll
          <span class="token punctuation">:</span>data="listData"
          <span class="token punctuation">:</span>class<span class="token punctuation">-</span>option="classOption"
          class="warp"
        <span class="token punctuation">></span>
          &lt;ul class="ul<span class="token punctuation">-</span>item" style="width<span class="token punctuation">:</span>720px;"<span class="token punctuation">></span>
            &lt;<span class="token tag">!--</span> 在这里改<span class="token punctuation">,</span> 手动修改a连接的href值和img的src值<span class="token punctuation">,</span> 如果你会进阶，你可以使用v<span class="token punctuation">-</span>for<span class="token punctuation">,</span> 或者数据使用动态数据<span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">></span><span class="token scalar string">
            
            &lt;li class="li-item">
              &lt;a href="http://baidu.com">
                &lt;img class="no-lazy" src="https://pic4.zhimg.com/80/v2-f549722dac8f777693c090a92498de0f_1440w.jpg">
              &lt;/a>
            &lt;/li></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>

            &lt;li class="li<span class="token punctuation">-</span>item"<span class="token punctuation">></span>
              &lt;a href="http<span class="token punctuation">:</span>//baidu.com"<span class="token punctuation">></span>
                &lt;img class="no<span class="token punctuation">-</span>lazy" src="https<span class="token punctuation">:</span>//pic4.zhimg.com/80/v2<span class="token punctuation">-</span>f549722dac8f777693c090a92498de0f_1440w.jpg"<span class="token punctuation">></span>
              &lt;/a<span class="token punctuation">></span>
            &lt;/li<span class="token punctuation">></span>
            &lt;<span class="token tag">!--</span> 在这里结束 <span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">></span><span class="token scalar string">
          &lt;/ul></span>
        &lt;/vue<span class="token punctuation">-</span>seamless<span class="token punctuation">-</span>scroll<span class="token punctuation">></span>
      &lt;/div<span class="token punctuation">></span>

      &lt;script src="/bli/index.js"<span class="token punctuation">></span>&lt;/script<span class="token punctuation">></span>
      &lt;link href="/bli/index.css" rel="stylesheet"<span class="token punctuation">></span>
    '
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
              </div>
            </details>
      </div>
      <div class="post-tags-categories">
        
        <div class="tags">
          
            <a href="/tags/Hexo/" class="">
              Hexo
            </a>
          
            <a href="/tags/sidebar/" class="">
              sidebar
            </a>
          
        </div>
        
      </div>
      
        <div class="copyright">
  <ul class="post-copyright">
    <li class="post-copyright-author">
    <strong>作者:  </strong>YuAng</a>
    </li>
    <li class="post-copyright-link">
    <strong>文章链接:  </strong>
    <a href="//post/hexo-theme-bamboo/sidebar/" target="_blank" title="Bamboo主题-首页新增侧边栏">http://yuang01.github.io//post/hexo-theme-bamboo/sidebar/</a>
    </li>
    <li class="post-copyright-license">
      <strong>版权声明:   </strong>
      本网站所有文章除特别声明外,均采用 <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">CC BY-NC-ND 4.0</a>
      许可协议。转载请注明出处!
    </li>
  </ul>
<div>
      
    </article>
    <!-- 上一篇文章和下一篇文章 -->
    
      <!-- 文章详情页的上一页和下一页 -->
<div class="post-nav">





  
  <div class="post-nav-next post-nav-item">
    <div class="post-nav-img" style="background-size: cover; 
      background-position: center center;">
      <img class="lazyload lazyload placeholder" src="https://pic4.zhimg.com/80/v2-5a575bb8ac734707f1ec05d6de6a0e0b_1440w.jpg" class="lazyload placeholder" data-srcset="https://pic4.zhimg.com/80/v2-5a575bb8ac734707f1ec05d6de6a0e0b_1440w.jpg" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" src="" alt="">
    </div>
    <a href="/post/getfiles/" class="post-nav-link">
      <div class="title">
        下一篇: <i class="fas fa-angle-right"></i>
        <div class="title-text">getFiles文件获取</div>
      </div>
      <!-- <div class="content">
        会把某个文件夹下的文件显示在页面上。例如我在source文件夹下，创建了一个叫做img的文件夹，把img的文件夹下的文件
      </div> -->
    </a>
  </div>

</div>

    
    

    <!-- 打赏 -->
    
      <div id="appDonate" class="post-donate">
  <div id="donate_board" class="donate_bar center" ref="donate">
    <a id="btn_donate" class="btn_donate" href="javascript:;" title="打赏" @click="showDialogDrawer()"></a>
  </div>
  <transition name="fade">
    <div 
      class="donate-box-mask"
      v-cloak 
      v-show="visible"
      @click="cancelDialogDrawer()"
    >
    </div>
  </transition>
  <transition name="bounce">
    <div class="donate-box" v-cloak v-show="visible">
      <div class="donate-box_close">
        <i class="fas fa-times" aria-hidden="true" @click="cancelDialogDrawer" pointer></i>
      </div>
      <div class="donate-box_title">
        <h4>
          你的赏识是我前进的动力
        </h4>
      </div>
      <div class="donate-box_tab">
        <div class="Alipay" pointer :class="{'active': tabActive === 'Alipay'}" @click="changeTabActive('Alipay')">
          支付宝
        </div>
        <div class="WeChatpay" pointer :class="{'active': tabActive === 'WeChatpay'}" @click="changeTabActive('WeChatpay')">
          微信
        </div>
      </div>
      <div class="donate-box_img">
        <div class="AlipayImg" v-show="tabActive === 'Alipay'">
          <img src="/medias/zfb.jpg" class="lazyload placeholder" data-srcset="/medias/zfb.jpg" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="支付宝打赏" />
        </div> 
        <div class="WeChatpayImg" v-show="tabActive === 'WeChatpay'">
          <img src="/medias/wx.jpg" class="lazyload placeholder" data-srcset="/medias/wx.jpg" srcset="https://img2.baidu.com/it/u=2037979560,2772131037&fm=26&fmt=auto&gp=0.jpg" alt="微信打赏" />
        </div>
      </div>
    </div>
  </transition>
</div>

<script>
  var body = document.body || document.documentElement || window;
  var vm = new Vue({
    el: '#appDonate',
    data: {
      visible: false,
      tabActive: 'Alipay',
      top: 0,
    },
    computed: {
    },
    mounted() {
    },
    methods: {
      showDialogDrawer() {
        this.visible = true;
        // 防止页面滚动，只能让弹框滚动
        // function getScroll() {
        //   return {
        //     left: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0,
        //     top: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
        //   };
        // }
        this.top = $(document).scrollTop() // or getScroll().top
        // console.log('aa', $('.main-content'));
        body.style.cssText = 'overflow: hidden;';
      },
      cancelDialogDrawer() {
        this.visible = false;
        body.removeAttribute('style');
        $(document).scrollTop(this.top)
      },
      changeTabActive(name) {
        this.tabActive = name;
      }
    },
    created() {}
  })
</script>
    

    <!-- 分享 -->
    
      <!-- https://github.com/overtrue/share.js -->
<!-- 文章详情页的分享 -->
<div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>

<script src="/js/shareJs/social-share.min.js"></script>
</script>

<style>
  .social-share {
    margin: 20px 0;
  }
</style>


    
    
    <!-- 评论 -->
    <!-- 评论 -->

  <div id="myComment">
    
      <div id="gitment-container"></div>

    
  </div>

<!-- comment script in themes\hexo-theme-bamboo\layout\_partial\scripts\index.ejs -->


  </div>

  <!-- 目录 -->
  <!-- 文章详情页右侧目录 -->

  <div class="toc-aside">
    <div class="toc-main">
      <div class="toc-aside-title">
        <i class="fas fa-list-ul" aria-hidden="true"></i><span>本文目录</span>
        
          <div class="toc-open-close">本文目录</div>
        
      </div>
      <div class="toc-content">
        <div class="toc"></div>
      </div>
    </div>
  </div>

  <!-- 手机端目录按钮 -->
  <div id="toc-mobile-btn">
    <i class="fas fa-list-ul" aria-hidden="true"></i>
  </div>
  <!-- js在scripts目录下的的toc.ejs里面 -->
  
    <style>
      .toc-aside {
        width: 0;
        padding: 0;
      }
      .toc-aside .toc-content {
        width: 0;
      }
      .toc-aside-title span, .toc-aside-title i {
        display: none;
      }
      .main-content {
        width: 75%;
        margin: 10px auto;
      }
    </style>
  

  <script>
    function openBtnClickFn () {
      let openOrCloseBtn = $('.toc-aside .toc-aside-title .toc-open-close');
      let open = eval('' || 'false');
      openOrCloseBtn.click(function() {
        if (open === true) {
          $(".toc-aside").css({'width': 0, 'padding': 0});
          $(".toc-content").css({'width': 0});
          $(".toc-aside-title span, .toc-aside-title i").css({'display': 'none'});
          $(".main-content").css({'width': '75%', 'margin': '10px auto'});
          open = false;
        } else {
          $(".toc-aside").css({'width': '300px', 'padding': '0 10px'});
          $(".toc-content").css({'width': '300px'});
          $(".toc-aside-title span, .toc-aside-title i").css({'display': 'inline-block'});
          $(".main-content").css({'width': '65%', 'margin-right': '10px', 'margin-left': 'calc(35% - 350px)'});
          open = true;
        }
      });
    };
    openBtnClickFn();
    document.addEventListener('pjax:complete', function () {
      openBtnClickFn();
    })
    
  </script>


  <!-- 图片放大 Wrap images with fancybox support -->
  <script src="/js/wrapImage.js"></script>
</div>

<!-- 文章详情页背景图 -->
<div id="appBgSwiper" style="position: fixed;left: 0;top: 0;width: 100%;height: 100%;z-index: -2;"
	:style="{'background-color': bgColor ? bgColor : 'transparent'}">
	<transition-group tag="ul" :name="names">
		<li v-for='(image,index) in img' :key='index' v-show="index === mark" class="bg-swiper-box">
			<img :src="image" class="bg-swiper-img no-lazy">
		</li>
	</transition-group>
</div>
<script>
	var vm = new Vue({
		el: '#appBgSwiper',
		data: {
			names: '' || 'fade' || 'fade', // translate-fade fade
			mark: 0,
			img: [],
			bgColor: '',
			time: null
		},
		methods: {   //添加方法
			change(i, m) {
				if (i > m) {
					// this.names = 'fade';
				} else if (i < m) {
					// this.names = 'fade';
				} else {
					return;
				}
				this.mark = i;
			},
			prev() {
				// this.names = 'fade';
				this.mark--;
				if (this.mark === -1) {
					this.mark = 3;
					return
				}
			},
			next() {
				// this.names = 'fade';
				this.mark++;
				if (this.mark === this.img.length) {
					this.mark = 0;
					return
				}
			},
			autoPlay() {
				// this.names = 'fade';
				this.mark++;
				if (this.mark === this.img.length) {
					this.mark = 0;
					return
				}
			},
			play() {
				let bgImgDelay = '' || '180000'
				let delay = parseInt(bgImgDelay) || 180000;
				this.time = setInterval(this.autoPlay, delay);
			},
			enter() {
				clearInterval(this.time);
			},
			leave() {
				this.play();
			}
		},
		created() {
			this.play()
		},
		beforeDestroy() {
			clearInterval(this.time);
		},
		mounted() {
			let prop = '' || 'https://pica.zhimg.com/80/v2-9659f2305acb80f25ced33aa980092c1_1440w.jpg,https://pica.zhimg.com/80/v2-292e6340491bd97f9d014d6be3371c04_1440w.jpg,https://api.btstu.cn/sjbz/api.php';
			let isImg = prop.includes('.bmp') || prop.includes('.jpg') || prop.includes('.png') || prop.includes('.tif') || prop.includes('.gif') || prop.includes('.pcx') || prop.includes('.tga') || prop.includes('.exif') || prop.includes('.fpx') || prop.includes('.psd') || prop.includes('.cdr') || prop.includes('.pcd') || prop.includes('.dxf') || prop.includes('.ufo') || prop.includes('.eps') || prop.includes('.ai') || prop.includes('.raw') || prop.includes('.WMF') || prop.includes('.webp') || prop.includes('.jpeg') || prop.includes('http://') || prop.includes('https://')
			if (isImg) {
				let img = prop.split(',');
				let configRoot = '/'
				let arrImg = [];
				img.forEach(el => {
					var Expression = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
					var objExp = new RegExp(Expression);

					if (objExp.test(el)) {
						// http or https
						arrImg.push(el);
					} else {
						// 非http or https开头
						// 本地文件
						let firstStr = el.charAt(0);
						if (firstStr == '/') {
							el = el.substr(1); // 删除第一个字符 '/',因为 configRoot最后一个字符为 /
						}
						el = configRoot + el;
						arrImg.push(el);
					}
				})
				this.img = arrImg;
			} else {
				this.bgColor = prop;
			}
		}
	})
</script>

<style>
	.bg-swiper-box {
		position: absolute;
		display: block;
		width: 100%;
		height: 100%;
	}

	.bg-swiper-img {
		object-fit: cover;
		width: 100%;
		height: 100%;
	}
</style>

      </main>
    </div>

    <!-- 页脚 -->
    
  
  <div class="footer bg-color">
    <div class="footer-main">
      
        
          <div class="link">
            
              
                <a href="/atom.xml" class="social">
                  
                    <i class="fas fa-rss" aria-hidden="true"></i>
                  
                </a>
              
            
              
                <a href="mailto:1730241541@qq.com" class="social">
                  
                    <i class="fas fa-envelope" aria-hidden="true"></i>
                  
                </a>
              
            
              
                <a target="_blank" rel="noopener" href="https://github.com/yuang01/hexo-theme-bamboo" class="social">
                  
                    <i class="fab fa-github" aria-hidden="true"></i>
                  
                </a>
              
            
              
                <a href="tencent://AddContact/?fromId=50&amp;fromSubId=1&amp;subcmd=all&amp;uin=1730241541" class="social">
                  
                    <i class="fab fa-qq" aria-hidden="true"></i>
                  
                </a>
              
            
          </div>
        
      
        
          <div class="footer-copyright">
            <p>Copyright © 2019 - 2020 <a target="_blank" rel="noopener" href="https://github.com/yuang01">yuang01</a> | Powered by <a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/docs/">Hexo</a> | Theme <a target="_blank" rel="noopener" href="https://github.com/yuang01/theme">Bamboo</a> </p>

          </div>
        
      
        
          
            <!-- 不蒜子统计 -->
            <!-- 不蒜子统计 -->
<span id="busuanzi_container_site_pv">
      <i class="fas fa-eye" aria-hidden="true"></i>本站总访问量：<span id="busuanzi_value_site_pv"></span> 次
</span>
<span class="post-meta-divider">|</span>
<span id="busuanzi_container_site_uv" style='display:none'>
      <i class="fas fa-users" aria-hidden="true"></i>本站访客数：<span id="busuanzi_value_site_uv"></span> 人
</span>

          
        
      
        
          <div class="footer-custom">
            
          </div>
        
      
    </div>
  </div>



    <!-- 渲染暗黑按钮 -->
    
      <div class="dark">
  <div class="dark-content">
    <i class="fas fa-moon" aria-hidden="true"></i>
    <!-- <span>关灯</span> -->
  </div>
  
</div>

<script>
  $(function() {
    let isDark = JSON.parse(localStorage.getItem('dark'))  || JSON.parse('false');
    if (isDark) {
      $(".dark-content").replaceWith(
          `
          <div class='dark-content'>
            <i class="fas fa-lightbulb" aria-hidden="true"></i>
          </div>
          `
        );
    }
    $('.dark').click(function() {
      if ($(document.body).is('.darkModel')) {
        $(document.body).removeClass('darkModel');
        localStorage.setItem('dark', false);
        $(".dark-content").replaceWith(
          `
          <div class='dark-content'>
            <i class="fas fa-moon" aria-hidden="true"></i>
          </div>
          `
        );
      } else {
        $(document.body).addClass('darkModel');
        localStorage.setItem('dark', true);
        $(".dark-content").replaceWith(
          `
          <div class='dark-content'>
            <i class="fas fa-lightbulb" aria-hidden="true"></i>
          </div>
          `
        );
      }
    })
  })
</script>
    
    <!-- 渲染回到顶部按钮 -->
    
      <div class="goTop top-btn-color" pointer>
  <i class="fas fa-arrow-up" aria-hidden="true"></i>
</div>
<script src="/js/goTop.js"></script>

    
    <!-- 渲染左下角音乐播放器 -->
    
      <link rel="stylesheet" href="/js/aplayer/APlayer@1.10.1.min.css">
<style>
.aplayer .aplayer-lrc p {
  
  font-size: 12px;
  font-weight: 700;
  line-height: 16px !important;
}

.aplayer .aplayer-lrc p.aplayer-lrc-current {
  
  font-size: 15px;
  color: #42b983;
}


.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
  left: -66px !important;
}

.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body:hover {
  left: 0px !important;
}


</style>
<meting-js  
  class=""
  server="netease"
  type="song"
  id="460793376"
  fixed='true'
  autoplay='true'
  theme='#42b983'
  loop='all'
  order='random'
  preload='auto'
  volume='0.7'
  list-folded='true'
>
</meting-js>

<!-- <style>
  #aplayer {
    position: fixed;
    left: 0;
    bottom: 300px;
  }
</style> -->
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>
    

    <!-- 图片放大 -->
    
      <script src="/js/fancybox/jquery.fancybox.min.js"></script>
    

    <!-- 百度解析 -->
    <!-- Baidu Analytics -->

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    <!-- 背景彩带 -->
    

    <script src="/js/utils/index.js"></script>
    <script src="/js/app.js" data-pjax></script>
    
    <!-- 文章目录所需js -->
<link href="/js/tocbot/tocbot.css" rel="stylesheet">
<script src="/js/tocbot/tocbot.min.js"></script>

<script>
  var headerEl = 'h2, h3, h4',  //headers 
    content = '.post-detail',//文章容器
    idArr = {};  //标题数组以确定是否增加索引id
  //add #id
  var option = {
    // Where to render the table of contents.
    tocSelector: '.toc',
    // Where to grab the headings to build the table of contents.
    contentSelector: content,
    // Which headings to grab inside of the contentSelector element.
    headingSelector: headerEl,
    scrollSmooth: true,
    scrollSmoothOffset: -80,
    headingsOffset: -($(window).height() * 0.4 - 45),
    positionFixedSelector: '.toc-main',
    positionFixedClass: 'is-position-fixed',
    fixedSidebarOffset: 'auto',
    activeLinkClass: 'is-active-link',
    // onClick: function (e) {},
  }
  if ($('.toc').length > 0) {

    $(content).children(headerEl).each(function () {
      //去除空格以及多余标点
      var headerId = $(this).text().replace(/[\s|\~|`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\_|\+|\=|\||\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?|\：|\，|\。]/g, '');

      headerId = headerId.toLowerCase();
      if (idArr[headerId]) {
        //id已经存在
        $(this).attr('id', headerId + '-' + idArr[headerId]);
        idArr[headerId]++;
      }
      else {
        //id未存在
        idArr[headerId] = 1;
        $(this).attr('id', headerId);
      }
    });

    document.addEventListener("DOMContentLoaded", function () {
      tocbot.init(option);
      mobileTocClick();
    });

  }

  window.tocScrollFn = function () {
    return bamboo.throttle(function () {
      findHeadPosition();
    }, 100)()
  }
  window.addEventListener('scroll', tocScrollFn);

  const findHeadPosition = function (top) {
    if ($('.toc').length <= 0) {
      return false;
    }
    setTimeout(() => {  // or DOMContentLoaded 
      autoScrollToc();
    }, 0);
  }

  const autoScrollToc = function () {
    const $activeItem = document.querySelector('.is-active-link');
    const $cardToc = document.querySelector('.toc-content');
    const activePosition = $activeItem.getBoundingClientRect().top
    const sidebarScrollTop = $cardToc.scrollTop
    if (activePosition > (document.documentElement.clientHeight - 100)) {
      $cardToc.scrollTop = sidebarScrollTop + 150
    }
    if (activePosition < 100) {
      $cardToc.scrollTop = sidebarScrollTop - 150
    }
  }

  document.addEventListener('pjax:send', function () {
    if ($('.toc').length) {
      tocbot.destroy();
    }
  });

  document.addEventListener('pjax:complete', function () {
    if ($('.toc').length) {
      tocbot.init(option);
      mobileTocClick();
    }
  });
  
  // 手机端toc按钮点击出现目录
  const mobileTocClick = function () {
    const $cardTocLayout = document.getElementsByClassName('toc-aside')[0];
    const $cardToc = $cardTocLayout.getElementsByClassName('toc-content')[0];
    let right = '45px';
    if (window.innerWidth >= 551 && window.innerWidth <= 992) {
      right = '100px'
    }
    const mobileToc = {
      open: () => {
        $cardTocLayout.style.cssText = 'animation: toc-open .3s; opacity: 1; right: ' + right
      },

      close: () => {
        $cardTocLayout.style.animation = 'toc-close .2s'
        setTimeout(() => {
          $cardTocLayout.style.cssText = "opacity:''; animation: ''; right: ''"
        }, 100)
      }
    }
    document.getElementById('toc-mobile-btn').addEventListener('click', () => {
      if (window.getComputedStyle($cardTocLayout).getPropertyValue('opacity') === '0') mobileToc.open()
      else mobileToc.close()
    })

    $cardToc.addEventListener('click', (e) => {
      if (window.innerWidth < 992) { // 小于992px的时候
        mobileToc.close()
      }
    })
  }
</script>

<style>
  .is-position-fixed {
    position: sticky !important;
    top: 74px;
  }

  .toc-main ul {
    counter-reset: show-list;
  }

  .toc-main ul li::before {
    content: counter(item)".";
    display: block;
    position: absolute;
    left: 12px;
    top: 0;
  }
</style> 

<!-- 渲染issues标签里的内容 -->
<script>
  function loadIssuesJS() {
    if ($(".post-detail").find(".issues-api").length == 0) {
      return;
    } 
    loadScript('/js/issues/index.js');
  };
  $(function () {
    loadIssuesJS();
  });
  document.addEventListener('pjax:complete', function () {
    if (typeof IssuesAPI == "undefined") {
      loadIssuesJS();
    }
  })
</script>

<!-- 输入框打字特效 -->
<!-- 输入框打字特效 -->

  <script src="/js/activate-power-mode.js"></script>
  <script>
    POWERMODE.colorful = true;  // 打开随机颜色特效
    POWERMODE.shake = false;    // 关闭输入框抖动
    document.body.addEventListener('input', POWERMODE);//监听打字事件
  </script>


<!-- markdown代码一键复制功能 -->

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/v-plugs-ayu/lib/ayu.css">
  <script src="https://cdn.jsdelivr.net/npm/v-plugs-ayu/lib/ayu.umd.min.js"></script>
  <script src="/js/clipboard/clipboard.min.js"></script>
  <div id="appCopy">
  </div>
  <script data-pjax>
    var vm = new Vue({
      el: '#appCopy',
      data: {
      },
      computed: {
      },
      mounted() {
        const that = this;
        var copy = '复制';
        /* code */
        var initCopyCode = function () {
          var copyHtml = '';
          copyHtml += '<button class="btn-copy" data-clipboard-snippet="" style="position:absolute;top:0;right:0;z-index:1;">';
          copyHtml += '<i class="fas fa-copy"></i><span>' + copy + '</span>';
          copyHtml += '</button>';
          $(".post-detail pre").not('.gutter pre').wrap("<div class='codeBox' style='position:relative;width:100%;'></div>")
          $(".post-detail pre").not('.gutter pre').before(copyHtml);
          new ClipboardJS('.btn-copy', {
            target: function (trigger) {
              return trigger.nextElementSibling;
            }
          });
        }
        initCopyCode();
        $('.btn-copy').unbind('click').bind('click', function () {
          doSomething();
        })
        $(document).unbind('keypress').bind('keypress', function (e) {
          if (e.ctrlKey && e.keyCode == 67) {
            doSomething();
          }
        })

        function doSomething() {
          that.$notify({
            title: "成功",
            content: "代码已复制，请遵守相关授权协议。",
            type: 'success'
          })
        }
      },
      methods: {
      },
      created() { }
    })
  </script>
  

<!-- 图片懒加载 -->
<script defer src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.min.js"></script>
<script>
  // https://www.npmjs.com/package/vanilla-lazyload
  // Set the options globally
  // to make LazyLoad self-initialize
  window.lazyLoadOptions = {
    elements_selector: ".lazyload",
    threshold: 0
  };
  // Listen to the initialization event
  // and get the instance of LazyLoad
  window.addEventListener(
    "LazyLoad::Initialized",
    function (event) {
      window.lazyLoadInstance = event.detail.instance;
    },
    false
  );
  document.addEventListener('DOMContentLoaded', function () {
    lazyLoadInstance.update();
  });
  document.addEventListener('pjax:complete', function () {
    lazyLoadInstance.update();
  });
</script>


<!-- 卡片滚动动画 -->
   

<!-- 评论所需js -->

  
    <script type="text/javascript">
    var utteranceCommon = {};
    
    function check_utterance() {
        let isDark = JSON.parse(localStorage.getItem('dark'))  || JSON.parse('false');
        if (isDark) {
            utteranceCommon.Theme = 'github-dark';
        } else {
            utteranceCommon.Theme = 'github-light';
        }

        return document.getElementById("gitment-container");
    }
    comment_el = '#gitment-container';
    load_utterance = function () {
        if ($(comment_el).length) {
            // 匿名函数，防止污染全局变量
            const HEAD = check_utterance();
            
            var utterances = document.createElement('script');
            utterances.type = 'text/javascript';
            utterances.async = true;
            utterances.setAttribute('issue-term','pathname')
            utterances.setAttribute('theme', utteranceCommon.Theme)
            utterances.setAttribute('repo','yuang01/yuang01.github.io')
            utterances.crossorigin = 'anonymous';
            utterances.src = 'https://utteranc.es/client.js';
            // content 是要插入评论的地方
            document.getElementById('gitment-container').appendChild(utterances);
            
        }
    }

    function dark_utterance() {
        const HEAD = check_utterance();
        if (!HEAD) return;
        const message = {
            type: 'set-theme',
            theme: utteranceCommon.Theme
        };
        const utteranceIframe = document.querySelector('iframe');
        utteranceIframe.contentWindow.postMessage(message, 'https://utteranc.es');
    }

    $(document).ready(load_utterance);
    document.addEventListener('pjax:complete', function () {
        load_utterance();
    });

    $('.dark').click(function() {
        setTimeout(() => {
            dark_utterance();
        });
    })
    
</script>

<style>
    .utterances {
        max-width: inherit!important;
    }
</style>
  


<!-- 鼠标点击特效 -->
<!-- 爱心点击 -->




  <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" data-pjax></script>


    <!-- pjax -->
    

<!-- pjax -->


  <script src="/js/pjax@0.2.8/index.js"></script>
  
    <!-- 样式位于：source/css/_third-party/pjaxanimate.styl -->

<div class="pjax-animate">
  
    <div class="loading-circle"><div id="loader-circle"></div></div>
    <script>
      window.ShowLoading = function() {
        $(".loading-circle").css("display", "block");
      };
      window.HideLoading = function() {
        $(".loading-circle").css("display", "none");
      }
    </script>
  
	<script>
    document.addEventListener('pjax:complete', function () {
      window.HideLoading();
    })
    document.addEventListener('pjax:send', function () {
      window.ShowLoading();
    })
    document.addEventListener('pjax:error', function () {
      window.HideLoading();
    })
	</script>
</div>

  

  <script>
    var pjax = new Pjax({
      elements: 'a[href]:not([href^="#"]):not([href="javascript:void(0)"]):not([no-pjax])',   // 拦截正常带链接的 a 标签
      selectors: ["#pjax-container","title"],                                   // 根据实际需要确认重载区域
      cacheBust: false,   // url 地址追加时间戳，用以避免浏览器缓存
      timeout: 5000
    });

    document.addEventListener('pjax:send', function (e) {

      try {
        var currentUrl = window.location.pathname;
        var targetUrl = e.triggerElement.href;
        var banUrl = [""];
        if (banUrl[0] != "") {
          banUrl.forEach(item => {
            if(currentUrl.indexOf(item) != -1 || targetUrl.indexOf(item) != -1) {
              window.location.href = targetUrl;
            }
          });
        }
      } catch (error) {}

      $(window).unbind('resize');
      $(window).unbind('scroll');
      $(document).unbind('scroll');
      $(document).unbind('click');
      $('body').unbind('click');

    })
    
    document.addEventListener('pjax:complete', function () {
      $('script[data-pjax], .pjax-reload script').each(function () {
        $(this).parent().append($(this).remove());
      });
    });

    document.addEventListener('pjax:error', function (e) {
      window.location.href = e.triggerElement.href;
    })
    
    // 刷新不从顶部开始
    document.addEventListener("DOMContentLoaded", function () {
      history.scrollRestoration = 'auto';
    })
  </script>



  </body>
</html>
